Search in sources :

Example 1 with LoggingFacade

use of oracle.kubernetes.operator.logging.LoggingFacade in project weblogic-kubernetes-operator by oracle.

the class TestUtil method getLogger.

static Logger getLogger(WlsDomainConfig wlsDomainConfig) throws Exception {
    if (wlsDomainConfigLoggerFacadeField == null) {
        wlsDomainConfigLoggerFacadeField = wlsDomainConfig.getClass().getDeclaredField("LOGGER");
        wlsDomainConfigLoggerFacadeField.setAccessible(true);
    }
    LoggingFacade loggingFacade = (LoggingFacade) wlsDomainConfigLoggerFacadeField.get(wlsDomainConfig);
    if (wlsDomainConfigLoggerField == null) {
        wlsDomainConfigLoggerField = loggingFacade.getClass().getDeclaredField("logger");
        wlsDomainConfigLoggerField.setAccessible(true);
    }
    return (Logger) wlsDomainConfigLoggerField.get(loggingFacade);
}
Also used : LoggingFacade(oracle.kubernetes.operator.logging.LoggingFacade) Logger(java.util.logging.Logger)

Example 2 with LoggingFacade

use of oracle.kubernetes.operator.logging.LoggingFacade in project weblogic-kubernetes-operator by oracle.

the class TestUtil method getLogger.

static Logger getLogger(WlsClusterConfig wlsClusterConfig) throws Exception {
    if (wlsClusterConfigLoggerFacadeField == null) {
        wlsClusterConfigLoggerFacadeField = wlsClusterConfig.getClass().getDeclaredField("LOGGER");
        wlsClusterConfigLoggerFacadeField.setAccessible(true);
    }
    LoggingFacade loggingFacade = (LoggingFacade) wlsClusterConfigLoggerFacadeField.get(wlsClusterConfig);
    if (wlsClusterConfigLoggerField == null) {
        wlsClusterConfigLoggerField = loggingFacade.getClass().getDeclaredField("logger");
        wlsClusterConfigLoggerField.setAccessible(true);
    }
    return (Logger) wlsClusterConfigLoggerField.get(loggingFacade);
}
Also used : LoggingFacade(oracle.kubernetes.operator.logging.LoggingFacade) Logger(java.util.logging.Logger)

Aggregations

Logger (java.util.logging.Logger)2 LoggingFacade (oracle.kubernetes.operator.logging.LoggingFacade)2