Commit ac350496 by Billy Larru

probando log4j2

parent ccf58721
......@@ -8,7 +8,9 @@
<!--The console output only level and above the level of the information (onMatch), directly to the other(onMismatch)-->
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY"/>
<!--This all know is the output log format-->
<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>
<!--<PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>-->
<PatternLayout pattern="%highlight{%d{HH:mm:ss.SSS} %-5level %logger{36}.%M() @%L - %msg%n}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=black, DEBUG=green bold, TRACE=blue}"/>
<!--<PatternLayout pattern="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} %highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, TRACE=blue} %style{${sys:PID}}{magenta} [%15.15t] %style{%-40.40C{1.}}{cyan} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%xEx}"/>-->
</Console>
<!--Document will print out all the information, the log every time you run the program will automatically clear, determined by the append property, this is also very useful, suitable for temporary test-->
<File name="log" fileName="D:/Logs/log/test.log" append="false">
......
......@@ -19,6 +19,9 @@ public class Main {
setLogLevel(Level.TRACE);
log.error("Inicializando programa...");
log.warn("advertencia...");
log.trace("traza");
log.debug("debug");
Date horaInicio = Metodos.getHoraEjecucion("12:00");
int periodo = 86400000;//El codigo se ejecutará cada 24h, 86400000 representa 24h en milisegundos
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment