0

I am using Java Logging (not Log4j). I want to send logs of level INFO and below it to System.out, and WARNING and SEVERE to System.err. I believe it looks much nicer, because I can easily distinguish error from info and below it. Is there anyway to do that?

In general, it is possible to tell Logger to log message below a certain level. Bu default it goes higher than the specified level.

Thanks a lot

Mohammad Roohitavaf
  • 439
  • 2
  • 6
  • 15

1 Answers1

1

I believe it looks much nicer, because I can easily distinguish error from info and below it. Is there anyway to do that?

As 'pruntlar' pointed out that is covered in: How do I change java logging console output from std err to std out?

In general, it is possible to tell Logger to log message below a certain level. By default it goes higher than the specified level.

Not out of the box. You have to write a Level filter and install it on the Logger or Handler.

jmehrens
  • 10,580
  • 1
  • 38
  • 47