public class LogUtil extends Object
Client logging settings are specified in an external property file. A logging target can be specified for each logging level. For example, the client can be
configured to log fatal and error level messages at
the server, debug at both the client and the server, and all others only
at the client.
| Modifier and Type | Class and Description |
|---|---|
static class |
LogUtil.LogLevel
Supported log levels.
|
static class |
LogUtil.LogTarget
Client logging targets.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getSettingsForClient()
Returns a JSON string that will be used by the client to initialize logging settings.
|
static LogUtil.LogTarget |
getTarget(LogUtil.LogLevel level)
Returns the client logging target for the specified logging level.
|
static void |
initSettings(Map<String,String> settings)
Initializes client logging settings.
|
static LogUtil.LogTarget |
setTarget(LogUtil.LogLevel level,
LogUtil.LogTarget target)
Sets the client logging target for a given logging level.
|
static LogUtil.LogLevel |
toLevel(String level)
Returns the
logging level from its text equivalent. |
static LogUtil.LogTarget |
toTarget(String target)
Returns the
logging target from its text equivalent. |
public static void initSettings(Map<String,String> settings)
settings - Map of logging settings.public static LogUtil.LogTarget getTarget(LogUtil.LogLevel level)
level - The logging level.public static LogUtil.LogTarget setTarget(LogUtil.LogLevel level, LogUtil.LogTarget target)
level - The logging level.target - The logging target.public static String getSettingsForClient()
public static LogUtil.LogLevel toLevel(String level)
logging level from its text equivalent.level - Text to convert.logging level.public static LogUtil.LogTarget toTarget(String target)
logging target from its text equivalent.target - Text to convert.logging target.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.