Java Code Examples for org.apache.cxf.common.logging.LogUtils#getLogger()

The following examples show how to use org.apache.cxf.common.logging.LogUtils#getLogger() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoggerHelperTest.java    From cxf with Apache License 2.0 6 votes vote down vote up
@Test
public void testEnableDisableConsoleLogging() {
    Logger rootLogger = LogUtils.getLogger(this.getClass(), null, "");
    Handler handler;

    /*Handler handler = LoggerHelper.getHandler(rootLogger, LoggerHelper.CONSOLE_HANDLER);
    assertNotNull("default console appender is there", handler);*/

    LoggerHelper.enableConsoleLogging();

    handler = LoggerHelper.getHandler(rootLogger, LoggerHelper.CONSOLE_HANDLER);
    assertNotNull("default console appender is not there", handler);

    LoggerHelper.disableConsoleLogging();

    handler = LoggerHelper.getHandler(rootLogger, LoggerHelper.CONSOLE_HANDLER);
    assertNull("Unexpected appender after disable", handler);
}
 
Example 2
Source File: LoggerHelper.java    From cxf with Apache License 2.0 4 votes vote down vote up
public static Logger getRootCXFLogger() {
    return LogUtils.getLogger(LoggerHelper.class, null, getRootLoggerName());
}
 
Example 3
Source File: LoggerHelper.java    From cxf with Apache License 2.0 4 votes vote down vote up
public static Logger getConsoleLogger() {
    return LogUtils.getLogger(LoggerHelper.class, null, "");
}
 
Example 4
Source File: AbstractTestServerBase.java    From cxf with Apache License 2.0 4 votes vote down vote up
protected Logger getLog() {
    return LogUtils.getLogger(this.getClass());
}