Parag Keshar Das
Parag Keshar Das

Reputation: 1

Log4j2 not working for runnable jar exported jar

<Configuration status="DEBUG">
    <!-- <Properties> <Property name="basePath">./logs</Property> </Properties> -->
    <!--where to genarate logs -->
    <Appenders>
        <!--reviewing logs is easy beacouse files are parmanent -->
        <RollingFile name="File" fileName="FirmLogs/${sys:logFileName}"
            filePattern="FirmLogs/${sys:logFileName}">
            <PatternLayout
                pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
            <SizeBasedTriggeringPolicy size="100 MB" />
        </RollingFile>
    </Appenders>
    <!--what type of logs genarate -->
    <Loggers>
        <!-- Here you can use multiple log levels All < Trace < Debug < Info < 
            Warn < Error < Fatal < Off -->

        <!-- it is taking refarance of file from RollingFile -->
        <Root level="info">

            <AppenderRef ref="File" />
        </Root>
    </Loggers>
</Configuration>

..this log4j2.xml which is in resources file ..normally from eclipse itis working but from not

But where i am storing jar in that folder I have FirmLogs Folder Nothing is storing there

Upvotes: 0

Views: 27

Answers (0)

Related Questions