0

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?

1
  • 1
    What IDE are you using? Usually red font means it was printed with System.err Commented Mar 21, 2011 at 23:05

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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()).

Comments

1

Better go for log4J framework.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.