Thanks to visit codestin.com
Credit goes to www.java2s.com
Home
Java
2D Graphics GUI
3D
Advanced Graphics
Ant
Apache Common
Chart
Class
Collections Data Structure
Data Type
Database SQL JDBC
Design Pattern
Development Class
EJB3
Email
Event
File Input Output
Game
Generics
GWT
Hibernate
I18N
J2EE
J2ME
JavaFX
JDK 6
JDK 7
JNDI LDAP
JPA
JSP
JSTL
Language Basics
Network Protocol
PDF RTF
Reflection
Regular Expressions
Scripting
Security
Servlets
Spring
Swing Components
Swing JFC
SWT JFace Eclipse
Threads
Tiny Application
Velocity
Web Services SOA
XML
Log4j « Language Basics « Java
Java
Language Basics
Log4j
1.
Example log4j Configuration File
2.
log4j: simple log
3.
log4j: log and servlet
4.
log4j: File Based Logg Demo
5.
log4j: asynchronous log
6.
log4j: A complete example
7.
log4j: layout demo
8.
log4j: advanced log
9.
set the level of the root logger to DEBUG and set its appender as an appender named testAppender
10.
define a named logger
11.
set the appender named testAppender to be a console appender
12.
set the layout for the appender testAppender
13.
define the root logger with two appenders writing to console and file
14.
define your own logger named com.foo
15.
and assign level and appender to your own logger
16.
define the appender named FILE
17.
define the appender named CONSOLE
18.
log4j Configuration File: #set the level of the root logger to DEBUG and set its appender as an appender named X
19.
log4j Configuration File: set the appender named X to be a console appender
20.
log4j Configuration File: set the layout for the appender X
21.
log4j Configuration File: define the root logger with two appenders writing to console and file
22.
log4j Configuration File: define your own logger named com.foo
23.
log4j Configuration File: assign appender to your own logger
24.
log4j Configuration File: define the appender named
25.
log4j Configuration File: define the appender named CONSOLE
26.
log4j.properties: set the level of the root logger to DEBUG (the lowest level) and set its appenders named DEBUG and CONSOLE
27.
log4j.properties: set your own logger
28.
log4j.properties: set the appender CONSOLE
29.
log4j.properties: set the appender FILE
30.
log4j.properties: set the appender ROLLING
31.
log4j.properties: set the appender DAILY
32.
log4j.properties: set the layout for the appenders
33.
log4j.properties: file layout
34.
log4j.properties: rolling layout
35.
log4j.properties: daily layout
36.
log4j config file: configuring the root logger
37.
log4j config file: configuring the named logger
38.
log4j config file: configuring the appender CONSOLE
39.
log4j config file: configuring the layout TTCCLayout
40.
html.properties: configuring the custom logger
41.
xml.properties: configuring the custom logger
42.
jdbc.properties configuration file for log4j
43.
jms.properties configuration file for JMS
44.
nt.properties for NT configuration
45.
smtp.properties for EMail based logging
46.
Pass the configuration file and configuration class
47.
Logging Servlet with log4j