Step :-1
Adding changes in master script.
static Logger log = Logger.getLogger(Practice.class);
BasicConfigurator.configure();log.info("This is Logger Info");
Step :-2
Adding changes in Project.
And create the "log4j.properties" file under SRC
Step :3
Adding changes in log4j.properties file.
# This sets the global logging level and specifies the appenderslog4j.rootLogger=INFO, theConsoleAppender
# settings for the console appender
log4j.appender.theConsoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.theConsoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.theConsoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Adding changes in master script.
static Logger log = Logger.getLogger(Practice.class);
BasicConfigurator.configure();log.info("This is Logger Info");
Step :-2
Adding changes in Project.
And create the "log4j.properties" file under SRC
Step :3
Adding changes in log4j.properties file.
# This sets the global logging level and specifies the appenderslog4j.rootLogger=INFO, theConsoleAppender
# settings for the console appender
log4j.appender.theConsoleAppender=org.apache.log4j.ConsoleAppender
log4j.appender.theConsoleAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.theConsoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
No comments:
Post a Comment