Friday 25 February 2022

Logback: hello world application

HelloWorld.java

package com.sample.app;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HelloWorld {

	public static void main(String[] args) {

		Logger logger = LoggerFactory.getLogger(HelloWorld.class);
		logger.debug("Hello world.");

	}
}

Output

19:39:57.272 [main] DEBUG com.sample.app.HelloWorld - Hello world.



Previous                                                 Next                                                 Home

No comments:

Post a Comment