Class LoggingManager
-
- All Implemented Interfaces:
@Deprecated() public final class LoggingManager
Manages JMeter logging
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringDEFAULT_PATTERNpublic final static StringLOG_FILEpublic final static StringLOG_PRIORITY
-
Method Summary
Modifier and Type Method Description static voidinitializeLogging(Properties properties)Initialise the logging system from the Jmeter properties. static voidsetLoggingLevels(Properties appProperties)Handle LOG_PRIORITY.category=priority and LOG_FILE.category=file_name properties. static StringremovePrefix(String name)Removes the standard prefix, i.e. static LoggergetLoggerForClass()Get the Logger for a class - no argument needed because the calling class name is derived automatically from the call stack. static LoggergetLoggerFor(String category)Get the Logger for a class. static LoggergetLoggerForShortName(String category)Get the Logger for a class. static voidsetPriority(String priority, String category)Set the logging priority for a category. static voidsetPriorityFullName(String priority, String fullName)Set the logging priority for a category. static voidsetPriority(Priority priority, String category)Set the logging priority for a category. static voidsetPriority(String priority)Set the logging priority. static voidsetPriority(Priority priority)Set the default logging priority. static voidsetTarget(LogTarget target, String category)Set the logging target for a category. static voidaddLogTargetToRootLogger(Array<LogTarget> logTargets)Add logTargets to root logger FIXME What's the clean way to add a LogTarget afterwards ? -
-
Method Detail
-
initializeLogging
@Deprecated() static void initializeLogging(Properties properties)
Initialise the logging system from the Jmeter properties. Logkit loggers inherit from their parents. Normally the jmeter properties file defines a single log file, so set this as the default from "log_file", default "jmeter.log" The default priority is set from "log_level", with a default of INFO
- Parameters:
properties- Properties to be used for initialization
-
setLoggingLevels
@Deprecated() static void setLoggingLevels(Properties appProperties)
Handle LOG_PRIORITY.category=priority and LOG_FILE.category=file_name properties. If the prefix is detected, then remove it to get the category.
- Parameters:
appProperties- Properties that contain the LOG_PRIORITY and LOG_FILE prefixed entries
-
removePrefix
@Deprecated() static String removePrefix(String name)
Removes the standard prefix, i.e. "org.apache.".
- Parameters:
name- from which to remove the prefix- Returns:
the name with the prefix removed
-
getLoggerForClass
static Logger getLoggerForClass()
Get the Logger for a class - no argument needed because the calling class name is derived automatically from the call stack.
- Returns:
Logger
-
getLoggerFor
static Logger getLoggerFor(String category)
Get the Logger for a class.
- Parameters:
category- - the full name of the logger category- Returns:
Logger
-
getLoggerForShortName
@Deprecated() static Logger getLoggerForShortName(String category)
Get the Logger for a class.
- Parameters:
category- - the full name of the logger category, this will have the prefix removed.- Returns:
Logger
-
setPriority
@Deprecated() static void setPriority(String priority, String category)
Set the logging priority for a category.
- Parameters:
priority- - string containing the priority name, e.g.category- - string containing the category
-
setPriorityFullName
@Deprecated() static void setPriorityFullName(String priority, String fullName)
Set the logging priority for a category.
- Parameters:
priority- - priority, e.g.fullName- - e.g.
-
setPriority
@Deprecated() static void setPriority(Priority priority, String category)
Set the logging priority for a category.
- Parameters:
priority- - e.g.category- - string containing the category
-
setPriority
@Deprecated() static void setPriority(String priority)
Set the logging priority.
- Parameters:
priority- - e.g.
-
setPriority
@Deprecated() static void setPriority(Priority priority)
Set the default logging priority.
- Parameters:
priority- e.g.
-
setTarget
@Deprecated() static void setTarget(LogTarget target, String category)
Set the logging target for a category.
- Parameters:
target- the LogTargetcategory- the category name
-
addLogTargetToRootLogger
@Deprecated() static void addLogTargetToRootLogger(Array<LogTarget> logTargets)
Add logTargets to root logger FIXME What's the clean way to add a LogTarget afterwards ?
- Parameters:
logTargets- LogTarget array
-
-
-
-