Skip to content
This repository was archived by the owner on Dec 8, 2017. It is now read-only.
This repository was archived by the owner on Dec 8, 2017. It is now read-only.

Injectable ServerLog instance #49

Description

@GoogleCodeExporter
We have an old legacy logging infrastructure where I work. We've got an slf4j 
facade that pipes slf4j messages into our framework, but even if Issue 18 gets 
solved, that would still mean two translations of logging levels (gwt-log to 
slf4j to LegacyLog). Could you make the instance of ServerLog that Log uses 
injectable? The following code is pulled from java.util.logging.LogManager's 
static init code:

String cname = System.getProperty("gwt-log.ServerLogImpl");
if (cname != null) {
    try {
        Class clazz = ClassLoader.getSystemClassLoader().loadClass(cname);
        impl = (ServerLog) clz.newInstance();
    } catch (ClassNotFoundException ex) {
        try {
            Class clz = Thread.currentThread()
                .getContextClassLoader().loadClass(cname);
            impl = (ServerLog) clz.newInstance();
        } catch (ClassNotFoundException ex) {
            throw new UnsupportedOperationException("Invalid class name");
        }
    }
}

Original issue reported on code.google.com by *stephen...@nanometrics.ca on 25 Nov 2010 at 10:39

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions