|
Oracle Fusion Middleware Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6.3) E26229-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.Writer
java.io.OutputStreamWriter
java.io.FileWriter
oracle.as.scheduler.cp.file.LogFile
public class LogFile
This class is the entry point for logging for requests. It can be used to log messages to the request's log file that can then be reviewed by the user or system administrator. It must be noted that at this time, there can be only one log file per request.
Users can obtain access to this object by using the getLogFile method on the ProcessHelper class. Instantiating this class directly is forbidden and can cause undefined behavior.
Created: Wed Mar 7 09:26:50 2007
ProcessHelper
Field Summary | |
---|---|
static int |
ALERT Alert messages. |
static int |
CONFIG Configuration logging message. |
static int |
EVENT High level logging messages. |
static int |
EXCEPTION Used for internal errors that may have been raised/exceptions that were thrown, which the user may not have been notified directly of. |
static int |
INFO INFO message |
static int |
PROCEDURE Logging messages called upon entry and/or exit from a routine. |
static int |
STATEMENT Low level logging messages giving maximum detail. |
static int |
UNEXPECTED Highest level of severity - catch-all for any errors that were not expected (by the developer) to have occurred during normal execution. |
static int |
USER_ERROR Messages at this level represent error messages the user might encounter. |
static int |
USER_WARNING Warning messages displayed to an end user. |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
LogFile(java.lang.String path, java.lang.String fileName, int logLevel) |
|
LogFile(java.lang.String path, java.lang.String fileName, int logLevel, boolean aflogLevel) Create a new log file fileName in the directory/path specified by path with the log level set to logLevel. |
Method Summary | |
---|---|
void |
close() Close this log file. |
int |
getCurrentLogLevel() Gets the current log level for the request that this log file is associated with. |
java.lang.String |
getFileName() Get the name of the file (without the path) that this object represents. |
boolean |
isWriteable() Check if the log file can be written to. |
void |
write(java.lang.String message) Write a string to the log file. |
void |
write(java.lang.String message, int level) Write a string to the log file. |
void |
writeln(java.lang.String message) Write a string to the log file along with a new line at the end of the string. |
void |
writeln(java.lang.String message, int level) Write a string to the log file along with a new line at the end of the string. |
Methods inherited from class java.io.OutputStreamWriter |
---|
flush, getEncoding, write, write, write |
Methods inherited from class java.io.Writer |
---|
append, append, append, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALERT
public static final int UNEXPECTED
public static final int USER_ERROR
public static final int EXCEPTION
public static final int USER_WARNING
public static final int INFO
public static final int CONFIG
public static final int EVENT
public static final int PROCEDURE
public static final int STATEMENT
Constructor Detail |
---|
public LogFile(java.lang.String path, java.lang.String fileName, int logLevel, boolean aflogLevel) throws java.io.IOException
path
- directory where the file should be createdfileName
- name of the log file to createlogLevel
- the level at which messages should be logged to this filejava.io.IOException
- if an error occurs writing to the log filepublic LogFile(java.lang.String path, java.lang.String fileName, int logLevel) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.lang.String getFileName()
public int getCurrentLogLevel()
public void write(java.lang.String message, int level) throws java.io.IOException
message
- the message stringlevel
- the level at which this message should be written.java.io.IOException
- if an error occurspublic void writeln(java.lang.String message, int level) throws java.io.IOException
message
- the message stringlevel
- the level at which this message should be written.java.io.IOException
- if an error occurspublic void write(java.lang.String message) throws java.io.IOException
write
in class java.io.Writer
message
- the message stringjava.io.IOException
- if an error occurspublic void writeln(java.lang.String message) throws java.io.IOException
message
- the message stringjava.io.IOException
- if an error occurspublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStreamWriter
java.io.IOException
- if an error occurs while closing the file.public boolean isWriteable()
|
Oracle Fusion Middleware Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6.3) E26229-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |