Home » Tag Archives: Logging (page 2)

Tag Archives: Logging

Never Test Logging

software-development-2-logo

Technical logging is usually not tested. As commentator write on stack overflow: I practice TDD/BDD pretty religiously and I almost never test logging. With some exceptions logging is either a developer convenience or a usability factor, not part of the method’s core specification. There is also a technical side why developers are reluctant, as Jon writes on the same page: ...

Read More »

Customizing Log4j 2.0

apache-log4j-logo

We are getting closer and closer to a Log4j 2 GA release and for that reason we should start looking into what it will give us. Personally I have a lot of reasons to be excited about Log4j 2.0. The community is great, the Apache License gives me a lot of freedom and finally it is protected by the Apache ...

Read More »

SLF4J Binding for ADFLogger – the Missing Piece

slf4j-logo

For reasons best left untold, in my day job, I was expected to provide an SLF4J Adapter for ADF Logger Oracle ADF. Not surprisingly, slf4j does not have an adapter for ADFLogger but since ADFLogger was just a gentle wrapper over Java Util Logging, it took a little over an hour to fill that gap. The testcases (more like main ...

Read More »

21st century logging

software-development-2-logo

I think logging should get more attention than we are currently giving it. When designing an application a great deal of effort goes into modelling the customer business logic, making sure all use cases are covered and handled properly. The business model is mapped to a persistence storage (be at a RDBMS or a NoSQL solution), frameworks are being chosen: ...

Read More »

How to create web-app with Quartz Scheduler and logging

quartz-scheduler-logo

I sometimes help out users in Quartz Scheduler forums. Once in a while some one would ask how can he/she setup the Quartz inside a web application. This is actualy a fairly simple thing to do. The library already comes with a ServletContextListener that you can use to start a Scheduler. I will show you a simple webapp example here. ...

Read More »

How to configure SLF4J with different logger implementations

slf4j-logo

There are many good benefits in using slf4j library as your Java application logging API layer. Here I will show few examples on how to use and configure it with different loggers. You can think of slf4j as an Java interface, and then you would need an implementation (ONLY ONE) at runtime to provide the actual logging details, such as ...

Read More »

Apache log4j is the leading logging framework

apache-log4j-logo

According to a survey from Zero Turnaround Apache log4j is the leading Java logging framework. This was actually a very interesting survey. It shows SLF4J is most often used as a logging facade with 61%. But it seems it is most often used with Apache Log4j, which is used by 52% of all survey participants. Just 29% use logback and ...

Read More »

SiftingAppender: logging different threads to different log files

logback-logo

One novel feature of Logback is SiftingAppender (JavaDoc). In short it’s a proxy appender that creates one child appender per each unique value of a given runtime property. Typically this property is taken from MDC. Here is an example based on the official documentation linked above:               <?xml version="1.0" encoding="UTF-8"?> <configuration> <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender"> ...

Read More »

Your logs are your data: logstash + elasticsearch

logstash-logo

Topic of today’s post stays a bit aside from day-to-day coding and development but nonetheless covers a very important subject: our application log files. Our apps do generate enormous amount of logs which if done right are extremely handy for problems troubleshooting. It’s not a big deal if you have a single application up and running, but nowadays apps, particularity ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close