Home » Tag Archives: Logging (page 4)

Tag Archives: Logging

Logback: Application errors notification

logback-logo

Some months ago when I was doing big application refactoring I found really annoying pieces of log4j based code used for logging repeated hundreds of times:                   if (LOG.isDebugEnabled()) { LOG.debug("Logging some stuff = " + stuff); } I wanted to get rid of isXXXEnabled an thats how I found Logback and ...

Read More »

Using slf4j with logback tutorial

logback-logo

In current post I am going to show you how to configure your application to use slf4j and logback as logger solution. The Simple Logging Facade For Java (slf4j) is a simple facade for various logging frameworks, like JDK logging (java.util.logging), log4j, or logback. Even it contains a binding tat will delegate all logger operations to another well known logging ...

Read More »

Filter irrelevant stack trace lines in logs

logback-logo

I love stack traces. Not because I love errors, but the moment they occur, stack trace is priceless source of information. For instance in web application the stack trace shows you the complete request processing path, from HTTP socket, through filters, servlets, controllers, services, DAOs, etc. – up to the place, where an error occurred. You can read them as ...

Read More »

Configure LogBack Logging with Spring

logback-logo

LogBack is an API for logging created by the same author of Log4j (a newer implementation, it is like a new version), during this article I’m going to show how to integrate it and use it on a Spring project. On this tutorial I assume you are using a simple Spring ROO project which will prepare all the structure of ...

Read More »

Logging exceptions root cause first

logback-logo

The 0.9.30 release of Logback logging library brings new awesome feature: logging stack traces starting from root (innermost) exception rather than from the outermost one. Of course my excitement has nothing to do with the fact that I contributed this feature… To paraphrase Cecil B. de Mille: “The way to make a blog post is to begin with a stack ...

Read More »

The Java Logging Mess

java-logo

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 ...

Read More »

10 Tips for Proper Application Logging

software-development-2-logo

Our latest JCP partner, Tomasz Nurkiewicz, has submitted a number of posts describing the basic principles of proper application logging. I found them quite interesting, thus I decided to aggregate them in a more compact format and present them to you. So, here are his suggestions for clean and helpful logs:(NOTE: The original posts have been slightly edited to improve ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.