Skip to content

Instantly share code, notes, and snippets.

@jmorenoamor
Last active October 4, 2023 06:14
Show Gist options
  • Save jmorenoamor/e27264c54c376c0a9fc2480508daa006 to your computer and use it in GitHub Desktop.
Save jmorenoamor/e27264c54c376c0a9fc2480508daa006 to your computer and use it in GitHub Desktop.
Mulesoft
# v1.2
# #################################################################################################
# Java defaults
# #################################################################################################
*.class
*.jar
*.war
*.ear
# #################################################################################################
# Eclipse
# #################################################################################################
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.classpath
.externalToolBuilders/
*.launch
.cproject
.buildpath
# #################################################################################################
# Anypoint Studio
# #################################################################################################
target/
.mule
.mule/**
.mule/**/*
.DS_Store
velocity.log
exchange-docs
exchange-docs/**
# #################################################################################################
# Project
# #################################################################################################
.env
Makefile
Dockerfile
/reports/
<?xml version="1.0" encoding="utf-8"?>
<!-- v1.0 -->
<Configuration>
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5p] [APP_NAME] %m%n"/>
</Console>
</Appenders>
<Loggers>
<AsyncLogger name="org.mule.service.http" level="WARN"/>
<AsyncLogger name="org.mule.extension.http" level="WARN"/>
<!-- Remove unnecesary Value was null, set to "" warning -->
<AsyncLogger name="com.ning.http.client.RequestBuilderBase" level="ERROR"/>
<!-- Reduce startup noise -->
<AsyncLogger name="org.quartz" level="WARN"/>
<AsyncLogger name="com.mulesoft.mule.runtime.plugin" level="WARN"/>
<AsyncLogger name="org.mule.maven.client" level="WARN"/>
<AsyncLogger name="org.mule.runtime.core.internal.util" level="WARN"/>
<AsyncLogger name="org.mule.munit.plugins.coverage.server" level="WARN"/>
<AsyncLogger name="org.mule.runtime.extension.internal.loader.enricher.ConfigRefDeclarationEnricher" level="ERROR"/>
<!-- Mule logger -->
<AsyncLogger name="org.mule.runtime.core.internal.processor.LoggerMessageProcessor" level="INFO"/>
<!--<AsyncLogger name="org.mule.runtime.core.internal.exception.OnErrorContinueHandler" level="FATAL"/>-->
<AsyncRoot level="INFO">
<AppenderRef ref="console"/>
</AsyncRoot>
</Loggers>
</Configuration>
<?xml version="1.0" encoding="utf-8"?>
<!-- v1.0 -->
<Configuration>
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5p] [APP_NAME] %m%n"/>
</Console>
</Appenders>
<Loggers>
<AsyncLogger name="org.mule.service.http" level="WARN"/>
<AsyncLogger name="org.mule.extension.http" level="WARN"/>
<!-- Remove unnecesary Value was null, set to "" warning -->
<AsyncLogger name="com.ning.http.client.RequestBuilderBase" level="ERROR"/>
<!-- Reduce startup noise -->
<AsyncLogger name="org.quartz" level="WARN"/>
<AsyncLogger name="com.mulesoft.mule.runtime.plugin" level="WARN"/>
<AsyncLogger name="org.mule.maven.client" level="WARN"/>
<AsyncLogger name="org.mule.runtime.core.internal.util" level="WARN"/>
<AsyncLogger name="org.mule.munit.plugins.coverage.server" level="WARN"/>
<AsyncLogger name="org.mule.runtime.extension.internal.loader.enricher.ConfigRefDeclarationEnricher" level="ERROR"/>
<!-- Mule logger -->
<AsyncLogger name="org.mule.runtime.core.internal.processor.LoggerMessageProcessor" level="INFO"/>
<AsyncLogger name="org.mule.runtime.core.internal.exception.OnErrorContinueHandler" level="FATAL"/>
<AsyncRoot level="INFO">
<AppenderRef ref="console"/>
</AsyncRoot>
</Loggers>
</Configuration>
/*
* Common logging functions
* v1.5.0
*/
import * from dw::Runtime
var indent = false
fun log (message: String, data: Any | Null ={}, context: Any | Null ={}): String =
try(() -> (unguardedLog(message, data default {}, context default {}))) orElse write('message="$(message)", context="{ }", data="[ ]"', "text/plain")
fun unguardedLog (message: String, data: Any, context: Any): Any =
write(([
'message="$(message)"' as String,
'context="$(write(context, "application/json", {indent:false}))"' as String,
'data="$(renderData(data default {}))"' as String,
]) joinBy ", ", "text/plain")
fun renderData (data: Any) =
if (data.^.mediaType startsWith("application/json"))
write(data, "application/json", {indent:indent})
else if (data.^.mediaType startsWith("application/java"))
write(data, "application/json", {indent:indent})
else if (data.^.mediaType startsWith("application/xml"))
write(data, "application/xml", {indent:indent, writeDeclaration: false})
else if (data.^.mediaType startsWith("text/xml"))
write(data, "application/xml", {indent:indent, writeDeclaration: false})
else
write(data, "application/json", {indent:indent})
{
"buckets":
[
{
"Name": "extras",
"Source": "https://github.com/ScoopInstaller/Extras",
"Updated": "2023-09-01T14:32:44+02:00",
"Manifests": 1891
},
{
"Name": "java",
"Source": "https://github.com/ScoopInstaller/Java",
"Updated": "2023-09-01T13:10:36+02:00",
"Manifests": 253
},
{
"Name": "main",
"Source": "https://github.com/ScoopInstaller/Main.git",
"Updated": "2023-09-01T14:30:24+02:00",
"Manifests": 1226
},
{
"Name": "nonportable",
"Source": "https://github.com/ScoopInstaller/Nonportable",
"Updated": "2023-09-01T10:31:49+02:00",
"Manifests": 127
}
],
"apps":
[
{
"Version": "8.2.1_5",
"Info": "",
"Updated": "2023-08-11T09:25:31.7396909+02:00",
"Name": "curl",
"Source": "main"
},
{
"Version": "5.6.2",
"Info": "",
"Updated": "2023-09-01T15:50:47.1289851+02:00",
"Name": "jmeter",
"Source": "extras"
},
{
"Version": "1.6",
"Info": "",
"Updated": "2023-07-29T13:00:56.0504913+02:00",
"Name": "jq",
"Source": "main"
},
{
"Version": "0.40.2",
"Info": "",
"Updated": "2023-08-30T19:00:11.6827911+02:00",
"Name": "lazygit",
"Source": "extras"
},
{
"Version": "4.4.1",
"Info": "",
"Updated": "2023-07-27T08:28:26.1348179+02:00",
"Name": "make",
"Source": "main"
},
{
"Version": "3.8.6",
"Info": "",
"Updated": "2023-07-28T08:13:30.8977201+02:00",
"Name": "maven",
"Source": "<auto-generated>"
},
{
"Version": "20.5.0",
"Info": "",
"Updated": "2023-07-27T08:23:16.1884464+02:00",
"Name": "nodejs",
"Source": "main"
},
{
"Version": "11.0.2-9",
"Info": "",
"Updated": "2023-07-28T08:27:04.4222579+02:00",
"Name": "openjdk11",
"Source": "java"
},
{
"Version": "3.1.1",
"Info": "",
"Updated": "2023-08-04T12:07:48.2392521+02:00",
"Name": "pyenv",
"Source": "main"
},
{
"Version": "0.2020.01.26",
"Info": "",
"Updated": "2023-07-27T08:27:22.4027857+02:00",
"Name": "sudo",
"Source": "main"
},
{
"Version": "1.21.4",
"Info": "",
"Updated": "2023-08-23T08:11:04.6059967+02:00",
"Name": "wget",
"Source": "main"
}
]
}
<project>
<properties>
<platformClientsRetriever.log.level>ERROR</platformClientsRetriever.log.level>
</properties>
<build>
<plugins>
<plugin>
<configuration>
<runtimeFabricDeployment>
<properties>
<logging.level.com.mulesoft.mule.runtime.gw.deployment.platform.interaction.clients.PlatformClientsRetriever>${platformClientsRetriever.log.level}</logging.level.com.mulesoft.mule.runtime.gw.deployment.platform.interaction.clients.PlatformClientsRetriever>
</properties>
</runtimeFabricDeployment>
</configuration>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment