SlideShare una empresa de Scribd logo
1 de 5
Descargar para leer sin conexión
What is logging
====================

logging is essential for debugging and for maintaing our application

We must know what is going in our application, specially when error come



SOP and printing exception message is not good?

         Writing system.out.println(“…..”);
         -------------------------------------------
         Should not be used for debugging messages, as it is very hard to remove those unnessary
                    Sop once coding is done …
         It may produce serious problem in production enveronment…headach for admin peoples

         Real advantage of logging is that it can be enable/disable and
         debugging messages can be directed to the file




Logging framewrok?
----------------------
Log 4j

log back

Commons logging

java.util.logging



most commonly used one is log4j
---------------------------------------

we should not fix ourself with any one specific logging framework as we
have to change as required....

go for facade ...use Simple Logging Facade for Java
                         --------------------------
Rajeev Gupta                                            Logging                          rgupta.trainer@gmail.com
http://www.slf4j.org/

SLF4j
=======
       The Simple Logging Facade for Java or (SLF4J) serves as
       a simple facade or abstraction for various logging frameworks,

       e.g. java.util.logging, log4j and logback,
       allowing the end user to plug in the desired
       logging framework at deployment time




                               Levels of logging
                               ----------------
                                          ALL----------->log everything
                                          DEBUG
                                          INFO
Rajeev Gupta                                               Logging        rgupta.trainer@gmail.com
WARN
                                             ERROR
                                             FATAL
                                             OFF----------->Log nothing

Starting log4j
---------------------
steps:
1.Download log4j
           http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.17/log4j-1.2.17.zip

2. Downlod SLF4j
       http://www.slf4j.org/



3. put 3 jar files in classpath

4. Now we need to configure the logging ie to tell what are levels of
       logging and where to log?




         greate code on MKYong.com
         ------------------
                    http://www.mkyong.com/logging/log4j-log4j-properties-examples/




         create a file log4j.properties
         ---------------------------------

# Root logger option
log4j.rootLogger=INFO, stdout

# Direct log messages to stdout
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{ABSOLUTE} %5p %c{1}:%L - %m%n

Hello World application
--------------------------

package com.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Applications {
Rajeev Gupta                                               Logging                      rgupta.trainer@gmail.com
private static final Logger logger=LoggerFactory.getLogger(Applications.class);

        public static void main(String[] args) {
                 System.out.println("Hello world logging");

                logger.info("stating logging!!!!");
                System.out.println("Hello world logging");
                logger.info("finished logging!!!!");
        }

}



example 2
----------------
package com.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Application2 {

        private static final Logger logger=LoggerFactory.getLogger(Applications.class);
        public static void main(String[] args) {
                 logger.info("start logging");
                 String no="4x";
                 try
                 {
                          Integer.parseInt(no);
                 }
                 catch(NumberFormatException ex)
                 {
                          logger.error("connot formet :"+no+" to and no....");
                 }

        }

}

now try Output to an file
-------------------------

# Root logger option
log4j.rootLogger=INFO, file
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=C:loging.log
log4j.appender.file.MaxFileSize=1MB
Rajeev Gupta                                         Logging                              rgupta.trainer@gmail.com
log4j.appender.file.MaxBackupIndex=1
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n




Rajeev Gupta                                     Logging                        rgupta.trainer@gmail.com

Más contenido relacionado

La actualidad más candente

Fluentd and PHP
Fluentd and PHPFluentd and PHP
Fluentd and PHP
chobi e
 
Centralized Logging with syslog
Centralized Logging with syslogCentralized Logging with syslog
Centralized Logging with syslog
amiable_indian
 
Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF Abyss
Sasha Goldshtein
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
Kernel TLV
 
Systemtap
SystemtapSystemtap
Systemtap
Feng Yu
 

La actualidad más candente (20)

Fluentd and PHP
Fluentd and PHPFluentd and PHP
Fluentd and PHP
 
Centralized Logging with syslog
Centralized Logging with syslogCentralized Logging with syslog
Centralized Logging with syslog
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native Environments
 
Epoll - from the kernel side
Epoll -  from the kernel sideEpoll -  from the kernel side
Epoll - from the kernel side
 
Linux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell scriptLinux fundamental - Chap 14 shell script
Linux fundamental - Chap 14 shell script
 
Linux crontab
Linux crontabLinux crontab
Linux crontab
 
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021
 
Understanding eBPF in a Hurry!
Understanding eBPF in a Hurry!Understanding eBPF in a Hurry!
Understanding eBPF in a Hurry!
 
Linux kernel tracing superpowers in the cloud
Linux kernel tracing superpowers in the cloudLinux kernel tracing superpowers in the cloud
Linux kernel tracing superpowers in the cloud
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profit
 
Fundamental of Shell Programming
Fundamental of Shell ProgrammingFundamental of Shell Programming
Fundamental of Shell Programming
 
Android Logging System
Android Logging SystemAndroid Logging System
Android Logging System
 
Profiling and optimizing go programs
Profiling and optimizing go programsProfiling and optimizing go programs
Profiling and optimizing go programs
 
Bpf performance tools chapter 4 bcc
Bpf performance tools chapter 4   bccBpf performance tools chapter 4   bcc
Bpf performance tools chapter 4 bcc
 
Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF Abyss
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
eBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to UserspaceeBPF Trace from Kernel to Userspace
eBPF Trace from Kernel to Userspace
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
Systemtap
SystemtapSystemtap
Systemtap
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPF
 

Destacado

Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)
Tola LENG
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
mohamedmoharam
 
Basic security & info
Basic security & infoBasic security & info
Basic security & info
Tola LENG
 
How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7
Tola LENG
 

Destacado (20)

Cool Code
Cool CodeCool Code
Cool Code
 
Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)Configure Proxy and Firewall (Iptables)
Configure Proxy and Firewall (Iptables)
 
Map.ppt
Map.pptMap.ppt
Map.ppt
 
Configure proxy firewall on SuSE Linux Enterprise Server 11
Configure proxy firewall on SuSE Linux Enterprise Server 11Configure proxy firewall on SuSE Linux Enterprise Server 11
Configure proxy firewall on SuSE Linux Enterprise Server 11
 
Advance C++notes
Advance C++notesAdvance C++notes
Advance C++notes
 
Network Diagram
Network DiagramNetwork Diagram
Network Diagram
 
Install linux suse(sless11)
Install linux suse(sless11)Install linux suse(sless11)
Install linux suse(sless11)
 
Configure active directory & trust domain
Configure active directory & trust domainConfigure active directory & trust domain
Configure active directory & trust domain
 
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux EnterpriseConfigure Webserver & SSL secure & redirect in SuSE Linux Enterprise
Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)
 
How to be a good presentor by tola
How to be a good presentor by tolaHow to be a good presentor by tola
How to be a good presentor by tola
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
Tola.leng sa nagios
Tola.leng sa nagiosTola.leng sa nagios
Tola.leng sa nagios
 
Jsp Notes
Jsp NotesJsp Notes
Jsp Notes
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
 
Struts2 notes
Struts2 notesStruts2 notes
Struts2 notes
 
Basic security & info
Basic security & infoBasic security & info
Basic security & info
 
File Share Server, FTP server on Linux SuSE and Windows
File Share Server, FTP server on Linux SuSE and WindowsFile Share Server, FTP server on Linux SuSE and Windows
File Share Server, FTP server on Linux SuSE and Windows
 
How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7How to configure IPA-Server & Client-Centos 7
How to configure IPA-Server & Client-Centos 7
 
Configure DHCP Server and DHCP-Relay
Configure DHCP Server and DHCP-RelayConfigure DHCP Server and DHCP-Relay
Configure DHCP Server and DHCP-Relay
 

Similar a Java Logging discussion Log4j,Slf4j

初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8
gak2223
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
jkumaranc
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
jkumaranc
 

Similar a Java Logging discussion Log4j,Slf4j (20)

Logging
LoggingLogging
Logging
 
Logback
LogbackLogback
Logback
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in Scala
 
Log4j in 8 slides
Log4j in 8 slidesLog4j in 8 slides
Log4j in 8 slides
 
Logging with Logback in Scala
Logging with Logback in ScalaLogging with Logback in Scala
Logging with Logback in Scala
 
Php logging
Php loggingPhp logging
Php logging
 
log4cpp-29/10
log4cpp-29/10log4cpp-29/10
log4cpp-29/10
 
Log4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updatesLog4cpp - Updated - to verify modify updates
Log4cpp - Updated - to verify modify updates
 
Rein_in_the_ability_of_log4j
Rein_in_the_ability_of_log4jRein_in_the_ability_of_log4j
Rein_in_the_ability_of_log4j
 
Log4jxml ex
Log4jxml exLog4jxml ex
Log4jxml ex
 
初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8初心者Scala in f@n 第五回 sbt+giter8
初心者Scala in f@n 第五回 sbt+giter8
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
LOGBack and SLF4J
LOGBack and SLF4JLOGBack and SLF4J
LOGBack and SLF4J
 
Log4j Logging Mechanism
Log4j Logging MechanismLog4j Logging Mechanism
Log4j Logging Mechanism
 
Software Engineering - RS4
Software Engineering - RS4Software Engineering - RS4
Software Engineering - RS4
 
SLF4J+Logback
SLF4J+LogbackSLF4J+Logback
SLF4J+Logback
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logs
 
Log4jprop example
Log4jprop exampleLog4jprop example
Log4jprop example
 

Más de Rajiv Gupta

Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
Rajiv Gupta
 
Core java 5 days workshop stuff
Core java 5 days workshop stuffCore java 5 days workshop stuff
Core java 5 days workshop stuff
Rajiv Gupta
 

Más de Rajiv Gupta (14)

Spring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by stepSpring5 hibernate5 security5 lab step by step
Spring5 hibernate5 security5 lab step by step
 
GOF Design pattern with java
GOF Design pattern with javaGOF Design pattern with java
GOF Design pattern with java
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentals
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
 
Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
Weblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencastWeblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencast
 
Struts2
Struts2Struts2
Struts2
 
Java 7
Java 7Java 7
Java 7
 
Lab work servlets and jsp
Lab work servlets and jspLab work servlets and jsp
Lab work servlets and jsp
 
Java Servlet
Java Servlet Java Servlet
Java Servlet
 
Spring aop with aspect j
Spring aop with aspect jSpring aop with aspect j
Spring aop with aspect j
 
Spring 3.0 dependancy injection
Spring 3.0 dependancy injectionSpring 3.0 dependancy injection
Spring 3.0 dependancy injection
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Core java 5 days workshop stuff
Core java 5 days workshop stuffCore java 5 days workshop stuff
Core java 5 days workshop stuff
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 

Java Logging discussion Log4j,Slf4j

  • 1. What is logging ==================== logging is essential for debugging and for maintaing our application We must know what is going in our application, specially when error come SOP and printing exception message is not good? Writing system.out.println(“…..”); ------------------------------------------- Should not be used for debugging messages, as it is very hard to remove those unnessary Sop once coding is done … It may produce serious problem in production enveronment…headach for admin peoples Real advantage of logging is that it can be enable/disable and debugging messages can be directed to the file Logging framewrok? ---------------------- Log 4j log back Commons logging java.util.logging most commonly used one is log4j --------------------------------------- we should not fix ourself with any one specific logging framework as we have to change as required.... go for facade ...use Simple Logging Facade for Java -------------------------- Rajeev Gupta Logging rgupta.trainer@gmail.com
  • 2. http://www.slf4j.org/ SLF4j ======= The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time Levels of logging ---------------- ALL----------->log everything DEBUG INFO Rajeev Gupta Logging rgupta.trainer@gmail.com
  • 3. WARN ERROR FATAL OFF----------->Log nothing Starting log4j --------------------- steps: 1.Download log4j http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.17/log4j-1.2.17.zip 2. Downlod SLF4j http://www.slf4j.org/ 3. put 3 jar files in classpath 4. Now we need to configure the logging ie to tell what are levels of logging and where to log? greate code on MKYong.com ------------------ http://www.mkyong.com/logging/log4j-log4j-properties-examples/ create a file log4j.properties --------------------------------- # Root logger option log4j.rootLogger=INFO, stdout # Direct log messages to stdout 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{ABSOLUTE} %5p %c{1}:%L - %m%n Hello World application -------------------------- package com.demo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Applications { Rajeev Gupta Logging rgupta.trainer@gmail.com
  • 4. private static final Logger logger=LoggerFactory.getLogger(Applications.class); public static void main(String[] args) { System.out.println("Hello world logging"); logger.info("stating logging!!!!"); System.out.println("Hello world logging"); logger.info("finished logging!!!!"); } } example 2 ---------------- package com.demo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Application2 { private static final Logger logger=LoggerFactory.getLogger(Applications.class); public static void main(String[] args) { logger.info("start logging"); String no="4x"; try { Integer.parseInt(no); } catch(NumberFormatException ex) { logger.error("connot formet :"+no+" to and no...."); } } } now try Output to an file ------------------------- # Root logger option log4j.rootLogger=INFO, file # Direct log messages to a log file log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=C:loging.log log4j.appender.file.MaxFileSize=1MB Rajeev Gupta Logging rgupta.trainer@gmail.com