| | Inefficient logging can "kill" your application 10 Tips for Proper Application Logging 1) Use the appropriate tools for the job, 2) Don't forget, logging levels are there for you, 3) Do you know what you are logging?, 4) Avoid side effects, 5) Be concise and descriptive... The Java Logging Mess Every application needs logging. And right now there are a lot of options on what exactly to use for logging in Java. The most famous frameworks are: log4j, logback, commons-logging, slf4j, java.util.logging. And there are a lot more – every now and then someone decides to write his own logger – just go to the Open Type dialog of your IDE and type "Logger" (not to mention that some use the name "Log"). And there's also the ServletContext.log(..) and stuff like that. It is indeed a mess. The Logging Olympics - A Race Between Today's Top 5 Java Logging Frameworks Logging is an age-old and intrinsic part of virtually every server-side application. It's the primary method by which applications output live state in a persistent and readable manner. Some applications may only log a few megabytes a day, while others may log gigabytes of data or more in a matter of hours. As logging usually involves IO to write data to disk (either blocking or async) – it comes at a cost. When logging large amounts of data over short periods of time, that cost can ramp up quickly. We decided to take a deeper look at the speed of some of today's leading logging engines. 5 techniques to improve your server logging In the recent time we've seen a plethora of tools that help you make sense of your logs. Open-source projects such as Scribe and LogStash, on-premise tools like Splunk, and hosted services such as SumoLogic and PaperTrail. These all help you reduce mass amounts of log data into something more meaningful. And there's one thing they all share in common. They're all dependent on the data you actually put into the log... Till the next time, enjoy...!! | | Your Suggestions Any ideas or suggestions? Shoot us an email at newsletter@javacodegeeks.com | | | | | |
No comments:
Post a Comment