java - Accessing Log4j2 logs within an external .jar -
i'm using java reflection run code that's inside .jar file. however, should not modify contents of file, have use .jar is. debugging tricky (because obfuscated inside it), thought might idea have @ logger.
i not find documentation directly relevant case, , honest i'm little confused whether or not possible.
here's log4j2.xml within .jar's root:
<configuration status="warn" packages="net.minecraft,com.mojang"> <appenders> <console name="sysout" target="system_out"> <patternlayout pattern="[%d{hh:mm:ss}] [%t/%level]: %msg%n" /> </console> <queue name="serverguiconsole"> <patternlayout pattern="[%d{hh:mm:ss} %level]: %msg%n" /> </queue> <rollingrandomaccessfile name="file" filename="logs/latest.log" filepattern="logs/%d{yyyy-mm-dd}-%i.log.gz"> <patternlayout pattern="[%d{hh:mm:ss}] [%t/%level]: %msg%n" /> <policies> <timebasedtriggeringpolicy /> <onstartuptriggeringpolicy /> </policies> </rollingrandomaccessfile> </appenders> <loggers> <root level="info"> <filters> <markerfilter marker="network_packets" onmatch="deny" onmismatch="neutral" /> </filters> <appenderref ref="sysout"/> <appenderref ref="file"/> <appenderref ref="serverguiconsole"/> </root> </loggers> </configuration>
i looked around, there not seem latest.log file, there no console output there.
so question if getting log's output @ possible in way without altering xml?
thank in advance,
cx
Comments
Post a Comment