Newsletter |
What Is Log4j, Why Log4j Came Into Picture
Log4j » on Feb 27, 2012 { 39 Comments } By Sivateja
For logging log4j is the best even today, let us see little history behind this ๐
While developing Java/J2EE applications, for debugging an application that is to know the status of a java application at its execution time, in general we use system.out.println statements in the application right…
But we have some disadvantages while using SOPL (system.out.println) statements.
- Generally SOPL statements are printed on console, so there are temporary messages and when ever the console is closed then automatically the messages are removed from the console
- It is not possible to store the SOPL messages in a permanent place and these are single threaded model, means these will prints only one by one message on the console screen
- In order to overcome the problemsย ofย SOPL statements Log4j came into picture, with Log4j we can store the flow details ofย our Java/J2EE in a file or databases
- This is a Open Source tool given by Apache, for only java projects, to record or write the status of an application at various places
- Working with log4j is nothing but working with classes & interfaces given in org.apache.log4j.*
- Log4j is a common tool, used for small to large scale Java/J2EE projects
- In Log4j we use log statements rather SOPL statements in the code to know the status of a project while it is executing
- In real time, after a project is released and it is installed in a client location then we call the location as on-site right, when executing the program at on-site location, if we got any problems occurred then these problems must report to the off showered engineers,ย in this time we used to mail these Log files only so that they can check the problems easily
โ โโ
You Might Also Like
::. About the Author .:: | ||
Comments
39 Responses to “What Is Log4j, Why Log4j Came Into Picture”
nice introduction by u………..
You explains in a very simple language and it is very well understood.
@swapna you are true, the way the explanation is too good.
Can you [lease mail me log4j,json,jquery material
Sir, your all the tutorial’s are Awesome…….
if Possible, Please provide WEB Services tutorial…….
Thanks……..
XmlLayout output is not a well formatted output
how to genertaed a well formatted Xml through xmlLayout
give complte files of Example
now only i understood for log4j…thanks sir……
Nyc explanation to begin with log4j…thanks ๐
Your way of explanation is really super…
Excellent tutorial!!!! Thank you sir!!!!
Dear sivateja reddy.
Really good job…………..
Wow! nice intro
Very good…explanation, nice..Thank you.
i understood, why log4j come in to picture….
thank u sir …..
hi ,
very good introduction about log4j
very nice explanation thanks ,till now i didn’t got thought about log4j.
to the point explanation !!
Hi ,
Siva Teja, its great tutorial i have never seen , could you please provide same
for spring MVC tutorial with maven project structure , because i have referred lot of tutorial for maven with spring MVC ,no where i found exact solution like java4s so please give at least one example with maven project structure
Thanks & Regards,
Krishna Arigela.
Too good explanation…
Unbelievable this is very nice explanation…
superb thank u yar
Awesome!!!
nice explanation…. thanks a lot..
Your nice explanation
You explained in very simple words and sentences.Now I have understood .Thanks sir
Sir,
It’s a very nice explanation..
Each and every thing of this tutorial is matching to the real scenario..
Great job..
Your explanation is very quite simple and understandable….Thank you for the assistance.
You Explained very well.
Excellent and Simple way of Explanation,
Thank you
Hi
Siva Teja Ur site very useful for beginers ๐
it’s very simple to understand
Nice Explanation…..
I am happy because eaisly understand
it’s very easy to understand and thank you!
I happy to vist this web site…
esly undestanble by every one thank u very much……
The way you have explained is really very much understandable.
Simple and Strong!
great explanation.
Hello sir,
I have one question. Suppose i have implemented log4j for logging implementation in Rest Easy Application and I want to log the information in ContainerRequestFilter implementation class. then please tell me user's request will be processed sequentially to print log then process api or both will be process paralleled.
Please help.
Thanks
Super sir..great explanation.