Skip to content

Log4j2 #66

@batghare

Description

@batghare

How do I use it with Log4j2 ?

These are my xml configurations patterlayout and jsonlayout works but not using

<Configuration status="trace"> <Appenders> <RollingFile name="file-log" fileName="C:/OdiService3.log" filePattern="C:/OdiService3-%d{yyyy-MM-dd}.log"> <!--<PatternLayout>--> <!--<pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n %X</pattern>-> <!--</PatternLayout>--> <!-- <JsonLayout locationInfo="true" complete="false" /> --> <layout class="net.logstash.log4j.JSONEventLayoutV1" /> <Policies> <TimeBasedTriggeringPolicy interval="1" modulate="true"/> </Policies> </RollingFile> <Console name="console" target="SYSTEM_OUT"> <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/> </Console> </Appenders> <Loggers> <Logger name="oracle.dicloud.odi" level="info" additivity="false"> <appender-ref ref="file-log" level="info"/> </Logger> <Root level="info" additivity="false"> <appender-ref ref="console"/> </Root> </Loggers> </Configuration>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions