• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class name with Packahe in System.Out  RSS feed

 
chicha sonu
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Just like in Hibernate the System Out comes as below
INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 65) HHH000397: Using ASTQueryTranslatorFactory

If i need to print my System Out with Package and Class name as above instead of stdout.How can i achieve it.
INFO [stdout] (ServerService Thread Pool -- 65) org.hibernate.ejb.EntityManagerFactoryImpl@170f27::IS CREATED:::::
Please help me with acheiving in the same.
Thanks in advance.
 
Stephan van Hulst
Saloon Keeper
Posts: 7991
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to use a logging framework, and stop using System.out.

I can recommend SLF4J using the Logback implementation.

slf4j-api.jar needs to be on the compile- and runtime classpaths, while logback-core.jar and logback-classic.jar need to be on the runtime classpath.
 
chicha sonu
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!