Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java log4j example

# Root logger option
log4j.rootLogger=DEBUG, stdout, file

# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n

# Redirect log messages to a log file, support file rolling.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=C:log4j-application.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
Comment

PREVIOUS NEXT
Code Example
Java :: Java Creating a HashSet 
Java :: string length java 
Java :: Java Change ArrayList Elements 
Java :: position of an element in infinite sorted array 
Java :: can we override the overloaded method in java 
Java :: Passing data from an activity to a fragment 
Java :: navigation bottom android 
Java :: java sort reverse lambda 
Java :: merge sort recursion java 
Java :: stringbuilder example in java 
Java :: how do you handle exceptions in java 
Java :: declaring java variables 
Java :: private method in interface java 
Java :: method overloading 
Java :: spring boot basic authentication 
Java :: java "-" 
Java :: how to use a while statement with char in java 
Java :: how does plus works in Java 
Java :: Java public no-arg constructor 
Java :: prefix vs postfix increment java 
Java :: show bottom sheet in adapter 
Java :: set the content of a Jlist from an other Jlist (Swing) 
Java :: How to define lambda expression in Java? 
Java :: enable GPS inside of application 
Java :: What is Java? 
Java :: return string consistent of n lowercase letters such is all letters occurs an odd number 
Java :: size of a tree node java linked;ist 
Java :: java platform runlater keeps running 
Java :: How to make sure a servlet is loaded at the application startup? 
Java :: how to make more than one jlabel at once in java 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =