Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SalidasAutomaticas
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
SalidasAutomaticas
Commits
ac350496
Commit
ac350496
authored
May 16, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
probando log4j2
parent
ccf58721
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
log4j2.xml
src/log4j2.xml
+3
-1
Main.java
src/salidasautomaticas/main/Main.java
+3
-0
No files found.
src/log4j2.xml
View file @
ac350496
...
...
@@ -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"
>
...
...
src/salidasautomaticas/main/Main.java
View file @
ac350496
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment