问题描述:

I am currently using Logger from Java.Util, The default behavior for logger.info is like the following

Mar 22, 2011 6:52:04 AM com.mycompany.app.App main

INFO: Test API Logger

The font is in red.

How to make the logger to output in just one line with black colored font?

网友答案:

Read the package documentation for java.util.logging. It will tell you how to create a configuration file. As per the comment, the red has nothing to do with java, it's something else messing with the output.

Or, you might prefer log4j if you want to do serious format tuning.

网友答案:

There's no colour configuration in the java logging framework at all. That's the IDE display choice (to show error in red, when logged using System.err or logger.error()).

网友答案:

Better go for log4J framework.

相关阅读:
Top