public final class OpenmrsLoggingUtil extends Object
getMemoryAppender() and
getOpenmrsLogLocation(), however, the methods to update loggers are also exposed if necessary.| Modifier and Type | Method and Description |
|---|---|
static void |
applyLogLevel(String logClass,
String logLevel)
Set the log4j log level for class
logClass to logLevel. |
static void |
applyLogLevels()
Sets the org.openmrs Log4J logger's level if global property log.level.openmrs (
OpenmrsConstants.GLOBAL_PROPERTY_LOG_LEVEL ) exists.
|
static MemoryAppender |
getMemoryAppender()
Gets the in-memory log appender.
|
static String |
getOpenmrsLogLocation()
Returns the location of the OpenMRS log file.
|
static void |
reloadLoggingConfiguration()
Reloads the logging configuration
|
@Logging(ignore=true) public static MemoryAppender getMemoryAppender()
public static String getOpenmrsLogLocation()
OpenmrsConstants.LOG_OPENMRS_FILE_APPENDER or if the appender with that name is not one of the default log4j2
file appending types.@Logging(ignore=true) public static void applyLogLevels()
public static void applyLogLevel(String logClass, String logLevel)
logClass to logLevel.logClass - optional string giving the class level to change. Defaults to
OpenmrsConstants.LOG_CLASS_DEFAULT . Should be something like org.openmrs.___logLevel - one of OpenmrsConstants.LOG_LEVEL_* constantspublic static void reloadLoggingConfiguration()
Copyright © 2024 OpenMRS Inc.. All rights reserved.