Tag Archives: Log4j

Scala: call me by my name please?

via Dublin Tech: Scala: call me by my name please?.

In Java, when frameworks such as log4J became popular in Java architectures it was a common occurence to see code such as:

Hibernate Logging Configuration – SLF4J + Log4j and Logback

via Hibernate Logging Configuration – SLF4J + Log4j and Logback | Examples Java Code Geeks.

In this example we are going to see how to configure Logging in Hibernate.SLF4J (Simple Logging Facade for Java) is a very nice logging framwork that Hibernate uses, in order to output your logs using your favorite logging tool ( log4j, JCL, JDK logging, logback) to your preferd location. We are going to use SLF4J along with log4j and Logback.

So these are the tools we are going to use on a Windows 7 platform:

  • JDK 1.7
  • Maven 3.0.5
  • Hibernate 4.2.3.Final
  • MySQL JDBC driver 5.1.9
  • Eclipse 4.3 Kepler

The basis of this tutorials is going to be this Eclipse project: HibernateMySQLExample.zip


via The new log4j 2.0.

Before a while a new major version of the well known log4j logging framework was released. Since the first alpha version appeared 4 more releases happened! You see, there is much more activity than with the predecessor log4j 1. And seriously, despite log4j 2s young age it is ways better. This blog will give an overview on a few of the great features of Apache log4j 2.0.

Simplify your logging with tinylog 1.0

via Simplify your logging with tinylog 1.0 | Java Code Geeks.

With a size of only 75 KB, tinylog is a lightweight alternative to the widespread classical logging frameworks Log4j and Logback. The final version 1.0 has been just released at the end of March, after three years of development. In several design issues, tinylog takes a deliberately different approach from classical logging frameworks in Java. This article will show the differences as well as the similarities to Log4j and Logback and give a brief introduction in tinylog.

Logback Additivity Example

via Logback Additivity Example | Examples Java Code Geeks.

If you use Logback or Log4j logging framework, you may come across some situations that you realize too much or too little log messages on the console or in a file. But you don’t actually understand how it happens. It is probably the consequence of the additivity attribute in the logging framework. So in this post, we shall discuss the additivity flag in the Logback framework.

Logback File Appender Example

via Logback File Appender Example | Examples Java Code Geeks.

Logging is a common and essential issue for software development. Logging allows you to analyse the program execution flow, to detect the bugs and warnings in the code. So logs are frequently the best (and sometimes the only) source of information about a running program.

In this example, we are going to show you how to record log messages in files using Logback framework. After a brief introduction to the overall Logback framework and File Appender in the Logback, we will discuss the implementation details of our example.

How to exclude libraries from all dependencies in Gradle

via How to exclude libraries from all dependencies in Gradle | IdanFridman.com.

I am using Spring boot. Spring boot by default comes with logback. I wanted to use log4j (for whatever reasons..)

In order to do that I had to exclude logback and add new log4j dependencies: