Dudi
Dudi

Reputation: 2430

How to restrict log4j console appender to log only on localhost

Working in both development and deployment environment, I want my log4j.properties to have include console appender, so I could view log messages when I develop. However when I deploy the application, I prefer to disable the console appender.

Is there a filter I can add on the console appender to do this?

Upvotes: 0

Views: 338

Answers (1)

artbristol
artbristol

Reputation: 32407

Deploy the application with a different log4j config file, that's why it's an external file.

Upvotes: 2

Related Questions