public class ErrorLog extends Log
Modifier and Type | Field and Description |
---|---|
static int |
All |
static int |
Assertion |
static int |
Debug |
static int |
Dump |
static int |
Errno |
static int |
Error |
static int |
Message |
static int |
Security |
static int |
Serious |
static int |
Warning |
CONTROL_BY_FLAG, CONTROL_BY_PRIORITY, m_sdf, NEWLINE, NO_LOG_CONTROL, STATE_FLAG_ALL, STATE_FLAG_NONE, STATE_PRIORITY_HIGHEST, STATE_PRIORITY_LOG_ALL, STATE_PRIORITY_LOG_NONE, STATE_PRIORITY_LOWEST
Constructor and Description |
---|
ErrorLog()
Constructs an instance of
ErrorLog . |
ErrorLog(String path)
Constructs an instance of
ErrorLog from a path. |
ErrorLog(String path,
String name,
int flags)
Constructs an instance of
ErrorLog from a path,
application name, and logging flags. |
Modifier and Type | Method and Description |
---|---|
static ErrorLog |
getDefaultLog()
Returns the default error log object.
|
void |
log(Object src,
String message)
Logs information to the log file.
|
void |
log(String message)
Logs information to the log file.
|
protected void |
openLog() |
void |
setFlags(int flags)
Sets the log flags.
|
void |
setInMemoryFlag(int value)
Sets the inMemorylogflag.
|
void |
setInMemorySize(long logsize)
Sets the inMemorylogsize.
|
close, controlToString, doLog, getControlState, getControlStyle, getLog, getMessageHeader, getName, isLogInMemory, log, log, log, log, log, setControlState, setControlStyle, setInMemoryFlagValue, setInMemoryLogSize, setName, setNames, setNames, setPath, setWriter
public static final int Assertion
public static final int Error
public static final int Warning
public static final int Debug
public static final int Errno
public static final int Message
public static final int Dump
public static final int Security
public static final int All
public static final int Serious
public ErrorLog()
ErrorLog
. By default will log
to the current directory using log named javapcm.log
.public ErrorLog(String path, String name, int flags)
ErrorLog
from a path,
application name, and logging flags.path
- The path for the log file.name
- The name of the application doing the logging.flags
- Log control flags.public ErrorLog(String path)
ErrorLog
from a path.path
- The path for the log file.public void setFlags(int flags)
flags
- The new log flags.public void setInMemoryFlag(int value)
value
- - valuepublic void setInMemorySize(long logsize)
logsize
- - log sizepublic void log(String message) throws IOException
message
- the line to log.IOException
public void log(Object src, String message) throws IOException
src
- If src is a string, it will be used to describe the source.
otherwise the name of the object class will be usedmessage
- the line to log.IOException
public static ErrorLog getDefaultLog()
The default log is controlled by the following properties set in the Infranet.properties file
javapcm.log
EBufException
- is thrown if an error occurs.Copyright © 2003, 2023, Oracle and/or its affiliates.