Modifier and Type | Method and Description |
---|---|
LogConfig |
addLog(String name)
Add a new log definition.
|
LogDescription.LogLevel |
getConsoleLogLevel()
Gets the console log level.
|
String |
getDefaultLogDirectory()
Gets the default log directory.
|
LogConfig |
getLog(String name)
Get a named log definition.
|
int |
getLoggingQueueSize()
Returns the maximum size of the asynchronous logging event queue.
|
List<LogConfig> |
getLogs()
Get list of all configured Log definitions.
|
String |
getServerLog()
Gets the server log.
|
boolean |
isAsyncLogging()
Is async logging option set?
|
boolean |
isLoggingMessageData()
Deprecated.
since 5.5
use |
boolean |
isLoggingThreadNames()
Is thread name logging option set?
|
LogConfig |
removeLog(String name)
Removes named log definition.
|
void |
setAsyncLogging(boolean asyncLogging)
Sets the asynchronous logging option.
|
void |
setConsoleLogLevel(LogDescription.LogLevel level)
Sets the console log level.
|
void |
setDefaultLogDirectory(String directory)
Sets the default log directory.
|
void |
setLoggingQueueSize(int size)
Sets the size of the event queue to use for the asynchronous logging
service.
|
void |
setLogMessageData(boolean logMessageData)
Deprecated.
since 5.5
This no longer has any effect - use
|
void |
setLogThreadNames(boolean threadNameLogging)
Sets the option to log the thread name with each message logged.
|
void |
setServerLog(String serverLog)
Sets the server log.
|
void setConsoleLogLevel(LogDescription.LogLevel level) throws ConfigException
This sets the log level to start console logging at.
If not specified then LogDescription.LogLevel.INFO
is assumed.
level
- log levelConfigException
- if unable to set the propertyLogDescription.LogLevel getConsoleLogLevel()
@Deprecated void setLogMessageData(boolean logMessageData) throws ConfigException
This no longer has any effect - use
RootConfig.setLogMessageData(boolean)
Indicates whether the data part of Messages should be logged as part of routine diagnostic message logging (fine and finest levels). If this is false then credentials message headers will also be hidden.
Default is true.
logMessageData
- true if message data is to be logged.ConfigException
- if unable to set the property@Deprecated boolean isLoggingMessageData()
use RootConfig.isLoggingMessageData()
instead
void setServerLog(String serverLog) throws ConfigException
The log to use for the server. This must be specified server side but is ignored client side.
serverLog
- the log to use for the server. This must be the name of
a configured log.ConfigException
- if unable to set the propertyString getServerLog()
void setDefaultLogDirectory(String directory) throws ConfigException
The default log folder for all logs, although this can be over-ridden for each log.
If not set, the default value is "logs".
directory
- the default log directoryConfigException
- if unable to set the propertyString getDefaultLogDirectory()
void setAsyncLogging(boolean asyncLogging) throws ConfigException
Indicates whether logging is asynchronous, that is performed by a separate thread as opposed to being performed in line by the logging thread.
By default this is set to true but in some environments there may be issues with this and it may need to be turned off.
asyncLogging
- true to set async logging on.ConfigException
- if unable to set the propertyboolean isAsyncLogging()
void setLoggingQueueSize(int size) throws ConfigException
If not explicitly set then this defaults to 128k. Normally this would not need to be changed.
size
- the maximum number of entries in the asynchronous logging
event queue.ConfigException
- if unable to set propertyint getLoggingQueueSize()
void setLogThreadNames(boolean threadNameLogging) throws ConfigException
By default the thread name is logged.
This option applies only to asynchronous logging.
threadNameLogging
- false to set the option to not log thread namesConfigException
- if unable to set the property.boolean isLoggingThreadNames()
List<LogConfig> getLogs()
LogConfig getLog(String name)
name
- the log definition nameLogConfig addLog(String name) throws ConfigException
name
- the log definition nameConfigException
- if unable to add new log definitionLogConfig removeLog(String name) throws ConfigException
name
- the definition nameConfigException
- if unable to add new log definitionCopyright © 2016 Push Technology Ltd. All Rights Reserved.