org.wso2.carbon.utils.logging
Class LoggingUtils
java.lang.Object
org.wso2.carbon.utils.logging.LoggingUtils
public class LoggingUtils
- extends Object
|
Method Summary |
static org.apache.log4j.spi.LoggingEvent |
getLogEvent(LogRecord record)
Return a logging event from the given log record |
static org.apache.log4j.Level |
getLogLevel(Level level)
Return the org.apache.log4j.Level from the given
java.util.logging.Level |
static TenantAwareLoggingEvent |
getTenantAwareLogEvent(org.apache.log4j.spi.LoggingEvent loggingEvent,
int tenantId,
String serviceName)
Returns a TenantAwareLoggingEvent that wraps the LoggingEvent with tenant specific tenantId
and serviceName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggingUtils
public LoggingUtils()
getLogEvent
public static org.apache.log4j.spi.LoggingEvent getLogEvent(LogRecord record)
- Return a logging event from the given log record
- Parameters:
record - - the log record
- Returns:
- - a LoggingEvent
getTenantAwareLogEvent
public static TenantAwareLoggingEvent getTenantAwareLogEvent(org.apache.log4j.spi.LoggingEvent loggingEvent,
int tenantId,
String serviceName)
- Returns a TenantAwareLoggingEvent that wraps the LoggingEvent with tenant specific tenantId
and serviceName
- Parameters:
loggingEvent - - The LoggingEvent with the log contenttenantId - - tenant Id of the tenant which triggered log eventserviceName - - service name of the current log event
- Returns:
- a TenantAwareLoggingEvent
getLogLevel
public static org.apache.log4j.Level getLogLevel(Level level)
- Return the
org.apache.log4j.Level from the given
java.util.logging.Level
- Parameters:
level - - the java.util.logging.Level
- Returns:
- - an
org.apache.log4j.Level
Copyright © 2014 WSO2 Inc. All rights reserved.