public class SAPLoggingProxyListener extends Object implements HybrisLogListener
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_CATEGORY |
static String |
FIELD_MSG_ID |
| Constructor and Description |
|---|
SAPLoggingProxyListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister()
Deregisters the listener from HybrisLogger
|
String |
getLogFilePath() |
String |
getLogSeverity() |
int |
getRotationCount() |
int |
getRotationSize() |
String |
getTraceFilePath() |
String |
getTraceSeverity() |
void |
init()
Initializes some of the properties and registers the listener with HybrisLogger
|
boolean |
isEnabledFor(org.apache.log4j.Level level)
Decides whether the current logging event should be logged or not
Always returns true because this listener is just a proxy to the SAP logging framework, it just passed the logging
event to the framwork.
|
boolean |
isEnableTracing() |
void |
log(HybrisLoggingEvent e)
Writes the log or trace to the physical file.
|
protected Level |
log4jConvertLevel1to2(org.apache.log4j.Level level)
Converts Log4J 1 Level to Log4J 2 Level
NOTE: The class HybrisLoggingEvent is still using the Log4J 1.2 Level.
|
protected int |
log4jLevelToSAPSeverity(Level level)
Maps default Log4J 2 Level to SAP Severity
|
void |
register()
Registers this listener with HybrisLogger
|
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setCsnComponentName(String csnComponentName) |
void |
setDataSupplierRepositoryService(DataSupplierRepositoryService dataSupplierRepositoryService) |
void |
setDcComponentName(String dcComponentName) |
void |
setEnableTracing(boolean enableTracing) |
void |
setLogFilePath(String logFilePath) |
void |
setLogSeverity(String logSeverity) |
void |
setRotationCount(int rotationCount) |
void |
setRotationSize(int rotationSize) |
void |
setTraceFilePath(String traceFilePath) |
void |
setTraceSeverity(String traceSeverity) |
public static final String FIELD_MSG_ID
public static final String FIELD_CATEGORY
public void init()
public void register()
public void deregister()
public boolean isEnabledFor(org.apache.log4j.Level level)
isEnabledFor in interface HybrisLogListenerlevel - level of the log which has to be checked for filteringlog method, false otherwiseprotected int log4jLevelToSAPSeverity(Level level)
level - The Log4J levelprotected Level log4jConvertLevel1to2(org.apache.log4j.Level level)
level - Level object from Log4J 1.2 packagepublic void log(HybrisLoggingEvent e)
log in interface HybrisLogListenere - the log which will be processedpublic void setLogFilePath(String logFilePath)
public void setTraceFilePath(String traceFilePath)
public void setLogSeverity(String logSeverity)
public void setTraceSeverity(String traceSeverity)
public void setRotationSize(int rotationSize)
public void setRotationCount(int rotationCount)
public void setCsnComponentName(String csnComponentName)
public void setDcComponentName(String dcComponentName)
public void setEnableTracing(boolean enableTracing)
public void setDataSupplierRepositoryService(DataSupplierRepositoryService dataSupplierRepositoryService)
public void setConfigurationService(ConfigurationService configurationService)
public String getLogSeverity()
public String getTraceSeverity()
public boolean isEnableTracing()
public String getLogFilePath()
public String getTraceFilePath()
public int getRotationCount()
public int getRotationSize()
Copyright © 2017 SAP SE. All Rights Reserved.