|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbandy.log.LogConfiguration
public class LogConfiguration
The LogConfiguration contains presets, defaults and preference values used to
configure the behaviour of the Log.
It provides two standard sets of configuration: the default log screen config
and the persistent log viewer config that is suitable if the log is just used
to display persistenly stored log messages in a auxiliary midlet.
Presets the user is well aware of such as the log level or the log modes are
stored as preference.
(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.
| Field Summary | |
|---|---|
static java.lang.String |
LOG_FILE_NAME
The name of the log file that is sent to the remote device or stored in the local file system |
| Constructor Summary | |
|---|---|
LogConfiguration()
|
|
| Method Summary | |
|---|---|
static LogConfiguration |
getLogAsAppScreenConfig(boolean loadPreferences)
Returns a configuration of the log suitable for use as an application screen within a MIdlet. |
int |
getLogLevel()
Get log level currently set. |
static LogConfiguration |
getPersistentLogViewerConfig(boolean loadPreferences)
Returns a configuration suitable when using the log canvas as single screen to show persistently stored log messages. |
boolean |
logModeCanvasEnabled()
Checks whether the log messages should be sent to the canvas. |
boolean |
logModeFileEnabled()
Checks whether the log messages should be sent to the file LOG_FILE_NAME. |
boolean |
logModePersistentEnabled()
Checks whether the log messages should be sent to the RMS. |
boolean |
logModeRemoteEnabled()
Checks whether the log messages should be sent to a remote machine. |
void |
setFilterLevel(int level,
boolean enabled)
Enable and disable respectively the filter for a given log level and store it as a preference. |
void |
setLogLevel(int logLevel)
Set the log level to logLevel and store it as a
preference. |
void |
setLogMode(int mode,
boolean enabled)
Enable and disable respectively the modes[mode] and store it as a preference. |
void |
setMaxCanvasLogEntries(int maxLogEntries)
Set the maximum number of entries that are displayed on the log canvas. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LOG_FILE_NAME
| Constructor Detail |
|---|
public LogConfiguration()
| Method Detail |
|---|
public static LogConfiguration getLogAsAppScreenConfig(boolean loadPreferences)
loadPreferences - If true, preference values are loaded if available
public static LogConfiguration getPersistentLogViewerConfig(boolean loadPreferences)
loadPreferences - If true, preference values are loaded if available
public void setLogLevel(int logLevel)
throws java.lang.Exception
logLevel and store it as a
preference.
logLevel - log level to set
java.lang.ExceptionLogLevelpublic int getLogLevel()
public void setLogMode(int mode,
boolean enabled)
throws java.lang.Exception
mode - Mode indicator (MODE_CANVAS | MODE_PERSISTENT | MODE_FILE |
MODE_REMOTE)enabled - Enabled if true, disabled else
java.lang.Exception
public void setFilterLevel(int level,
boolean enabled)
throws java.lang.Exception
level - Log level to which the filter appliesenabled - Enabled if true, disabled else
java.lang.Exceptionpublic void setMaxCanvasLogEntries(int maxLogEntries)
maxLogEntries - Maximum entries on log canvaspublic boolean logModeCanvasEnabled()
public boolean logModePersistentEnabled()
public boolean logModeFileEnabled()
LOG_FILE_NAME.
public boolean logModeRemoteEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||