Skip to content

let the user configure its own logger #118

Description

@jpcaruana

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions