Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let the user configure its own logger #118

Open
jpcaruana opened this issue Apr 23, 2015 · 0 comments
Open

let the user configure its own logger #118

jpcaruana opened this issue Apr 23, 2015 · 0 comments

Comments

@jpcaruana
Copy link
Contributor

Hi,

I was wondering why errors went to std error. I found that the class net.codestory.http.logs.Logs starts with the line

private static final LogsImplementation LOG = Boolean.getBoolean("PROD_MODE") ? 
                                         new Slf4jLogs() : new ConsoleLogs();

Why not let the user decide if he wants console or syslog when he develops ?

My log4j.properties in src/tests/resources looks like this in every project I have been working on:

log4j.rootLogger=DEBUG, stdout, syslog
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.syslog=org.apache.log4j.net.SyslogAppender
log4j.appender.syslog.syslogHost=localhost
log4j.appender.syslog.Facility=LOCAL7
# more configuration

I have console and syslog logging at the same time.

private static final LogsImplementation LOG = new Slf4jLogs();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant