Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from michaelhyatt/aligning_listeners
Browse files Browse the repository at this point in the history
Aligning listeners
  • Loading branch information
michaelhyatt authored Oct 19, 2020
2 parents e5b31e9 + 25fad88 commit c341b65
Show file tree
Hide file tree
Showing 46 changed files with 1,149 additions and 262 deletions.
File renamed without changes.
File renamed without changes.
64 changes: 26 additions & 38 deletions dep-test/pom.xml → examples/dep-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<app.runtime>4.2.1</app.runtime>
<mule.maven.plugin.version>3.2.7</mule.maven.plugin.version>
<app.runtime>4.3.0-20200824</app.runtime>
<mule.maven.plugin.version>3.3.5</mule.maven.plugin.version>
<munit.version>2.1.5</munit.version>
</properties>

Expand All @@ -31,8 +31,13 @@
<groupId>co.elastic.apm</groupId>
<artifactId>mule4-agent</artifactId>
</sharedLibrary>
</sharedLibraries>
</configuration>
<sharedLibrary>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</sharedLibrary>
</sharedLibraries>
<classifier>mule-application</classifier>
</configuration>
</plugin>
<plugin>
<groupId>com.mulesoft.munit.tools</groupId>
Expand Down Expand Up @@ -64,47 +69,30 @@
<dependency>
<groupId>co.elastic.apm</groupId>
<artifactId>mule4-agent</artifactId>
<version>0.0.2</version>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-http-connector</artifactId>
<version>1.5.3</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-sockets-connector</artifactId>
<version>1.1.5</version>
<classifier>mule-plugin</classifier>
</dependency>



<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>2.1.5</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>2.1.5</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
<version>0.2.0</version>
</dependency>
<dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-db-connector</artifactId>
<version>1.5.4</version>
<artifactId>mule-http-connector</artifactId>
<version>1.5.22</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-sockets-connector</artifactId>
<version>1.2.0</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.16</version>
<classifier>indy</classifier>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-scripting-module</artifactId>
<version>1.1.6</version>
<version>1.1.7</version>
<classifier>mule-plugin</classifier>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mul
<logger level="INFO" doc:name="Logger"
doc:id="8d245e86-ab3d-4f9b-bea5-687e74810f55" message="real flow" />
<scripting:execute engine="groovy" doc:name="Execute" doc:id="6d3eda0d-f4d5-4e19-8bde-3d317045804e" >
<scripting:code >def val = Math.abs(new Random().nextInt() % 10) + 1;
<scripting:code ><![CDATA[def val = Math.abs(new Random().nextInt() % 10) + 1;
print val;
if (val == 5)
throw new Exception(&quot;This is 5 my dudes!&quot;);</scripting:code>
throw new Exception("This is 5 my dudes!");]]></scripting:code>
</scripting:execute>
</flow>
</mule>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<AsyncLogger name="org.mule.service.http" level="WARN" />
<AsyncLogger name="org.mule.extension.http" level="WARN" />

<AsyncLogger name="co.elastic.apm.mule4" level="DEBUG" />
<AsyncLogger name="co.elastic" level="INFO" />
<!-- <AsyncLogger name="co.elastic.apm.mule4" level="DEBUG" />
<AsyncLogger name="co.elastic" level="INFO" /> -->

<!-- Mule logger -->
<AsyncLogger
Expand Down
48 changes: 48 additions & 0 deletions examples/domain/proj1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ------------------------------------------------------------------------------ #
# Java defaults (https://github.com/github/gitignore/blob/master/Java.gitignore) #
# ------------------------------------------------------------------------------ #
*.class

# Package Files #
*.jar
*.war
*.ear

# ------------------------------------------------------------------------------------------- #
# Eclipse-specific (https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore) #
# ------------------------------------------------------------------------------------------- #
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.classpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath

# --------------- #
# Studio-specific #
# --------------- #
target/
.mule/**
.mule/**/*
.DS_Store
velocity.log
4 changes: 4 additions & 0 deletions examples/domain/proj1/mule-artifact.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"minMuleVersion": "4.3.0-20200824",
"domain": "test-domain-1.0.0-SNAPSHOT-mule-domain"
}
98 changes: 98 additions & 0 deletions examples/domain/proj1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany</groupId>
<artifactId>proj1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule-application</packaging>

<name>proj1</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<app.runtime>4.3.0-20200824</app.runtime>
<mule.maven.plugin.version>3.3.5</mule.maven.plugin.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>${mule.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>co.elastic.apm</groupId>
<artifactId>mule4-agent</artifactId>
<version>0.2.0</version>
</dependency>
<dependency>
<groupId>co.elastic.apm</groupId>
<artifactId>mule4-agent</artifactId>
<version>0.2.0</version>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-http-connector</artifactId>
<version>1.5.21</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-sockets-connector</artifactId>
<version>1.2.0</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>test-domain</artifactId>
<version>1.0.0-SNAPSHOT</version>
<classifier>mule-domain</classifier>
<scope>provided</scope>
</dependency>
</dependencies>

<repositories>
<repository>
<id>anypoint-exchange-v2</id>
<name>Anypoint Exchange</name>
<url>https://maven.anypoint.mulesoft.com/api/v2/maven</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>https://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-releases</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>https://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

</project>
16 changes: 16 additions & 0 deletions examples/domain/proj1/src/main/mule/proj1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:api-gateway="http://www.mulesoft.org/schema/mule/api-gateway" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/api-gateway http://www.mulesoft.org/schema/mule/api-gateway/current/mule-api-gateway.xsd">

<import doc:name="Import" doc:id="b9240848-52ad-4dcc-8ed4-6f9e864bd1e4" file="tracer.xml" />
<api-gateway:autodiscovery apiId="16383844" ignoreBasePath="true" doc:name="API Autodiscovery" doc:id="abe59b71-735f-48ea-8d2b-fcc67b2acea0" flowRef="proj1Flow" />
<flow name="proj1Flow" doc:id="d1454c5a-5cac-406e-a90a-cc9543353dfc" >
<http:listener doc:name="Listener" doc:id="c1859fe0-cdc7-4e9a-9b1e-03ed1561078f" config-ref="HTTP_Listener_config" path="/proj1"/>
<logger level="INFO" doc:name="Logger" doc:id="b7ab0159-b992-4f06-b0b0-f0b1972a68ad" message="proj1 invoked"/>
<set-payload value='{ "result": "proj1 success" }' doc:name="Set Payload" doc:id="e56c4871-3629-4fde-b011-c8f8a6984ed5" />
</flow>
</mule>
38 changes: 38 additions & 0 deletions examples/domain/proj1/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Configuration>

<!--These are some of the loggers you can enable. There are several more
you can find in the documentation. Besides this log4j configuration, you
can also use Java VM environment variables to enable other logs like network
(-Djavax.net.debug=ssl or all) and Garbage Collector (-XX:+PrintGC). These
will be append to the console, so you will see them in the mule_ee.log file. -->

<Appenders>
<RollingFile name="file"
fileName="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}proj1.log"
filePattern="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}proj1-%i.log">
<PatternLayout
pattern="%-5p %d [%t] [processor: %X{processorPath}; event: %X{correlationId}] %c: %m%n" />
<SizeBasedTriggeringPolicy size="10 MB" />
<DefaultRolloverStrategy max="10" />
</RollingFile>
</Appenders>
<Loggers>

<!-- Http Logger shows wire traffic on DEBUG. -->
<!--AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger"
level="DEBUG" / -->
<AsyncLogger name="org.mule.service.http" level="WARN" />
<AsyncLogger name="org.mule.extension.http" level="WARN" />

<!-- Mule logger -->
<AsyncLogger
name="org.mule.runtime.core.internal.processor.LoggerMessageProcessor"
level="INFO" />
<AsyncLogger name="co.elastic.apm" level="DEBUG" />

<AsyncRoot level="INFO">
<AppenderRef ref="file" />
</AsyncRoot>
</Loggers>
</Configuration>
31 changes: 31 additions & 0 deletions examples/domain/proj1/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%-5p %d [%t] %c: %m%n"/>
</Console>
</Appenders>

<Loggers>

<!-- Http Logger shows wire traffic on DEBUG. -->
<!--AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" /-->
<AsyncLogger name="org.mule.service.http" level="WARN"/>
<AsyncLogger name="org.mule.extension.http" level="WARN"/>

<!-- Reduce startup noise -->
<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.quartz" level="WARN"/>
<AsyncLogger name="org.mule.munit.plugins.coverage.server" level="WARN"/>

<!-- Mule logger -->
<AsyncLogger name="org.mule.runtime.core.internal.processor.LoggerMessageProcessor" level="INFO"/>

<AsyncRoot level="INFO">
<AppenderRef ref="Console"/>
</AsyncRoot>
</Loggers>

</Configuration>
Loading

0 comments on commit c341b65

Please sign in to comment.