public class LegacyLogManagerImpl extends HandleResource implements LegacyLogManager
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
DEFAULT_SUBSYSTEM
Default subsystem description for WRITE-MESSAGE().
|
private boolean |
isDataServer
If
true , implement DSLOG-MANAGER otherwise this is the LOG-MANAGER. |
instProc
Constructor and Description |
---|
LegacyLogManagerImpl(boolean isDataServer)
Package private constructor to create an instance that is either a LOG-MANAGER or a
DSLOG-MANAGER instance.
|
Modifier and Type | Method and Description |
---|---|
logical |
clearLog()
Delete all messages from the currently open log file.
|
logical |
closeLog()
Close the currently open log file.
|
character |
getDBContext()
Obtains the logical database name of database that the DSLOG-MANAGER is generating log
entries.
|
character |
getEntryTypesList()
Provides the comma-separated list of currently valid entry types that can be assigned to
the
setLogEntryTypes(java.lang.String) . |
character |
getLogEntryTypes()
Provides the comma-separated list of entry types that are being actively used for logging.
|
character |
getLogFileName()
Obtains the filename to which log entries and stack traces are written.
|
integer |
getLoggingLevel()
Obtains the default logging level for all logging categories.
|
integer |
getLogThreshold()
Obtains the configured log file size in bytes at which the log file will be renamed and a
new log file started.
|
integer |
getNumLogFiles()
Obtains the configured number of log files that will be stored in total (including both
backed up log files and the current log).
|
void |
setDBContext(character ldbname)
Assigns the logical database name of database that the DSLOG-MANAGER is generating log
entries.
|
void |
setDBContext(java.lang.String ldbname)
Assigns the logical database name of database that the DSLOG-MANAGER is generating log
entries.
|
void |
setLogEntryTypes(character types)
Modifies the list of log entry types that are being actively used for logging.
|
void |
setLogEntryTypes(java.lang.String types)
Modifies the list of log entry types that are being actively used for logging.
|
void |
setLogFileName(character name)
Assigns the filename to which log entries and stack traces are written.
|
void |
setLogFileName(java.lang.String name)
Assigns the filename to which log entries and stack traces are written.
|
void |
setLoggingLevel(int level)
Assigns the default logging level for all logging categories.
|
void |
setLoggingLevel(integer level)
Assigns the default logging level for all logging categories.
|
boolean |
valid()
Reports if this object is valid for use.
|
logical |
writeMessage(character msg)
Write a user defined message to the currently open log file using the default subsystem
name "APPL".
|
logical |
writeMessage(character msg,
character subsys)
Write a user defined message to the currently open log file using the given subsystem
name.
|
logical |
writeMessage(character msg,
java.lang.String subsys)
Write a user defined message to the currently open log file using the given subsystem
name.
|
logical |
writeMessage(java.lang.String msg)
Write a user defined message to the currently open log file using the default subsystem
name "APPL".
|
logical |
writeMessage(java.lang.String msg,
character subsys)
Write a user defined message to the currently open log file using the given subsystem
name.
|
logical |
writeMessage(java.lang.String msg,
java.lang.String subsys)
Write a user defined message to the currently open log file using the given subsystem
name.
|
getResourceType, id, id, implicitDeletion, instantiatingProcedure, invalidAttribute, readOnlyError, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceType, readOnlyError
id, id, unknown
instantiatingProcedure
private static final java.lang.String DEFAULT_SUBSYSTEM
private boolean isDataServer
true
, implement DSLOG-MANAGER otherwise this is the LOG-MANAGER.LegacyLogManagerImpl(boolean isDataServer)
isDataServer
- true
if this should be a DSLOG-MANAGER, false
for a
LOG-MANAGER instance.public character getEntryTypesList()
setLogEntryTypes(java.lang.String)
.getEntryTypesList
in interface LegacyLogManager
public character getLogEntryTypes()
getLogEntryTypes
in interface LegacyLogManager
public void setLogEntryTypes(java.lang.String types)
setLogEntryTypes
in interface LegacyLogManager
types
- The comma-separated list of active entry types.public void setLogEntryTypes(character types)
setLogEntryTypes
in interface LegacyLogManager
types
- The comma-separated list of active entry types.public character getLogFileName()
getLogFileName
in interface LegacyLogManager
public void setLogFileName(java.lang.String name)
setLogFileName
in interface LegacyLogManager
name
- The log file name.public void setLogFileName(character name)
setLogFileName
in interface LegacyLogManager
name
- The log file name.public integer getLoggingLevel()
getLoggingLevel
in interface LegacyLogManager
public void setLoggingLevel(int level)
There are 5 valid levels:
setLoggingLevel
in interface LegacyLogManager
level
- The logging level to use by default.public void setLoggingLevel(integer level)
There are 5 valid levels:
setLoggingLevel
in interface LegacyLogManager
level
- The logging level to use by default.public integer getLogThreshold()
getLogThreshold
in interface LegacyLogManager
public integer getNumLogFiles()
getNumLogFiles
in interface LegacyLogManager
public character getDBContext()
getDBContext
in interface LegacyLogManager
unknown
if no database name has been
assigned.public void setDBContext(java.lang.String ldbname)
setDBContext
in interface LegacyLogManager
ldbname
- The logical database name.public void setDBContext(character ldbname)
setDBContext
in interface LegacyLogManager
ldbname
- The logical database name.public logical clearLog()
clearLog
in interface LegacyLogManager
true
if the operation succeeded, or false
otherwise.public logical closeLog()
closeLog
in interface LegacyLogManager
true
if the operation succeeded, or false
otherwise.public logical writeMessage(java.lang.String msg)
writeMessage
in interface LegacyLogManager
msg
- The message to write.true
if the operation succeeded, or false
otherwise.public logical writeMessage(character msg)
writeMessage
in interface LegacyLogManager
msg
- The message to write.true
if the operation succeeded, or false
otherwise.public logical writeMessage(java.lang.String msg, java.lang.String subsys)
writeMessage
in interface LegacyLogManager
msg
- The message to write.subsys
- Subsystem name (up to 10 characters will be used).true
if the operation succeeded, or false
otherwise.public logical writeMessage(character msg, java.lang.String subsys)
writeMessage
in interface LegacyLogManager
msg
- The message to write.subsys
- Subsystem name (up to 10 characters will be used).true
if the operation succeeded, or false
otherwise.public logical writeMessage(java.lang.String msg, character subsys)
writeMessage
in interface LegacyLogManager
msg
- The message to write.subsys
- Subsystem name (up to 10 characters will be used).true
if the operation succeeded, or false
otherwise.public logical writeMessage(character msg, character subsys)
writeMessage
in interface LegacyLogManager
msg
- The message to write.subsys
- Subsystem name (up to 10 characters will be used).true
if the operation succeeded, or false
otherwise.public boolean valid()
valid
in interface WrappedResource
true
.