Skip to content

Commit

Permalink
stdout logging to understand windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Sep 12, 2024
1 parent bee2ed5 commit 69c4d18
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 104 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/crosschecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Start PostgreSQL on Windows
if: runner.os == 'Windows'
run: |
sc.exe config postgresql-x64-14 start=auto
sc.exe start postgresql-x64-14
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java JDK
Expand All @@ -65,5 +60,10 @@ jobs:
run: mvn -T 1C checkstyle:check tools:verify-legal-files modernizer:modernizer apache-rat:check
- name: Test
run: mvn -T 1C clean test '-Dinvoker.streamLogs=true' '-Dmodernizer.skip=true' '-Dianal.phase=none' '-Drat.skip=true' '-Dcheckstyle.skip=true' '-Dsass.skip=true'
- name: Start PostgreSQL on Windows
if: runner.os == 'Windows'
run: |
sc.exe config postgresql-x64-14 start=auto
sc.exe start postgresql-x64-14
- name: Verify
run: mvn -f fit/core-reference/pom.xml verify '-Dit.test=RESTITCase' '-Dinvoker.streamLogs=true' '-Dmodernizer.skip=true' '-Drat.skip=true' '-Dcheckstyle.skip=true' '-Djacoco.skip=true'
130 changes: 33 additions & 97 deletions fit/core-reference/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,171 +20,107 @@ under the License.
<configuration status="WARN">

<appenders>
<RollingRandomAccessFile name="main" fileName="${sys:syncope.log.dir}/core.log"
filePattern="${sys:syncope.log.dir}/core-%d{yyyy-MM-dd}.log.gz"
immediateFlush="false" append="true">
<PatternLayout>
<pattern>%d{HH:mm:ss.SSS} %notEmpty{[operation.id=%X{operation.id}] }%-5level %logger - %msg%n</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingRandomAccessFile>

<RollingRandomAccessFile name="persistence" fileName="${sys:syncope.log.dir}/core-persistence.log"
filePattern="${sys:syncope.log.dir}/core-persistence-%d{yyyy-MM-dd}.log.gz"
immediateFlush="false" append="true">
<PatternLayout>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingRandomAccessFile>
<Console name="console" target="SYSTEM_OUT" follow="true">
<PatternLayout pattern="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} %notEmpty{[operation.id=%X{operation.id}] }%highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, TRACE=blue} [%11.11t] %style{%-60.60c{60}}{cyan} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
</Console>

<RollingRandomAccessFile name="rest" fileName="${sys:syncope.log.dir}/core-rest.log"
filePattern="${sys:syncope.log.dir}/core-rest-%d{yyyy-MM-dd}.log.gz"
immediateFlush="false" append="true">
<PatternLayout>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingRandomAccessFile>

<RollingRandomAccessFile name="connid" fileName="${sys:syncope.log.dir}/core-connid.log"
filePattern="${sys:syncope.log.dir}/core-connid-%d{yyyy-MM-dd}.log.gz"
immediateFlush="false" append="true">
<PatternLayout>
<pattern>%d{HH:mm:ss.SSS} %-5level %msg%n</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingRandomAccessFile>

</appenders>

<loggers>

<asyncLogger name="org.apache.syncope.core.persistence" additivity="false" level="INFO">
<appender-ref ref="persistence"/>
</asyncLogger>
<asyncLogger name="org.springframework.data" additivity="false" level="INFO">
<appender-ref ref="persistence"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.springframework.orm" additivity="false" level="INFO">
<appender-ref ref="persistence"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.openjpa" additivity="false" level="INFO">
<appender-ref ref="persistence"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.ibatis" additivity="false" level="INFO">
<appender-ref ref="persistence"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.springframework.data.neo4j.cypher.unrecognized" additivity="false" level="ERROR">
<appender-ref ref="persistence"/>
</asyncLogger>
<asyncLogger name="org.springframework.data.neo4j.core.mapping" additivity="false" level="ERROR">
<appender-ref ref="persistence"/>
</asyncLogger>


<asyncLogger name="org.apache.syncope.core.rest" additivity="false" level="INFO">
<appender-ref ref="rest"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.springframework.web" additivity="false" level="INFO">
<appender-ref ref="rest"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.http" additivity="false" level="INFO">
<appender-ref ref="rest"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.cxf" additivity="false" level="ERROR">
<appender-ref ref="rest"/>
</asyncLogger>
<asyncLogger name="org.apache.syncope.ext.self.keymaster" additivity="false" level="ERROR">
<appender-ref ref="rest"/>
<appender-ref ref="console"/>
</asyncLogger>

<asyncLogger name="org.identityconnectors" additivity="false" level="DEBUG">
<appender-ref ref="connid"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="net.tirasa.connid" additivity="false" level="DEBUG">
<appender-ref ref="connid"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.syncope.core.provisioning.api.ConnIdBundleManager" additivity="false" level="INFO">
<appender-ref ref="connid"/>
<appender-ref ref="console"/>
</asyncLogger>

<asyncLogger name="org.apache.syncope" additivity="false" level="INFO">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.syncope.core.provisioning" additivity="false" level="INFO">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.syncope.core.logic" additivity="false" level="INFO">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.springframework" additivity="false" level="INFO">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.flowable" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="liquibase" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.fop" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.wss4j" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.apache.xml" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.opensaml" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="io.swagger" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.reflections" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="org.elasticsearch" additivity="false" level="INFO">
<appender-ref ref="main"/>
</asyncLogger>
<asyncLogger name="org.opensearch" additivity="false" level="INFO">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="io.netty" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="com.zaxxer.hikari" additivity="false" level="ERROR">
<appender-ref ref="main"/>
</asyncLogger>
<asyncLogger name="org.apache.zookeeper" additivity="false" level="ERROR">
<appender-ref ref="main"/>
</asyncLogger>
<asyncLogger name="org.apache.curator" additivity="false" level="ERROR">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>

<!-- To enable when setting 'mail.debug=true' in mail.properties -->
<!--<asyncLogger name="org.apache.syncope.core.provisioning.java.job.notification" additivity="false" level="DEBUG">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>
<asyncLogger name="javax.mail" additivity="false" level="DEBUG">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</asyncLogger>-->

<root level="INFO">
<appender-ref ref="main"/>
<appender-ref ref="console"/>
</root>

</loggers>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1610,8 +1610,8 @@ under the License.
<version>1.10.14</version>
<configuration>
<container>
<log>${project.build.directory}/log/cargo.log</log>
<output>${project.build.directory}/log/cargo-output.log</output>
<!--<log>${project.build.directory}/log/cargo.log</log>
<output>${project.build.directory}/log/cargo-output.log</output>-->
<systemProperties>
<syncope.conf.dir>${project.build.directory}/test-classes</syncope.conf.dir>
<syncope.connid.location>file:${bundles.directory}/</syncope.connid.location>
Expand Down

0 comments on commit 69c4d18

Please sign in to comment.