com.sun.identity.log
Class Logger
java.lang.Object
|
+--java.util.logging.Logger
|
+--com.sun.identity.log.Logger
- public class Logger
- extends java.util.logging.Logger
Sun Java System Identity Server extension to the jdk1.4 Logger
This extension gives some functionality required by Sun Java System Identity Server
secure logger.
For JDK1.4 Logger please refer to
http://java.sun.com/j2se/1.4.1/docs/api/java/util/logging/Logger.html
Field Summary |
static com.sun.identity.log.util.ReaderWriterLock |
rwLock
|
Fields inherited from class java.util.logging.Logger |
global |
Method Summary |
void |
flush()
Writes all the buffered log records. |
java.lang.String |
getCurrentFile()
Returns the current file to which the logger's handler is writing to. |
static java.util.logging.Logger |
getLogger(java.lang.String name)
Find or create a logger for a named subsystem. |
static java.util.logging.Logger |
getLogger(java.lang.String name,
java.lang.String rbName)
Find or create a logger for a named subsystem. |
void |
log(java.util.logging.LogRecord record)
Directs every log call to log(LogRecord, Object)
And thus the default authorization check does not allow logging
when an application uses this interface. |
void |
log(java.util.logging.LogRecord record,
java.lang.Object cred)
Calls super.log after checking authorization. |
void |
setCurrentFile(java.lang.String fileName)
Set the current file to which the logger's handler is writing to. |
Methods inherited from class java.util.logging.Logger |
addHandler, config, entering, entering, entering, exiting, exiting, fine, finer, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getHandlers, getLevel, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, isLoggable, log, log, log, log, logp, logp, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setLevel, setParent, setUseParentHandlers, severe, throwing, warning |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rwLock
public static com.sun.identity.log.util.ReaderWriterLock rwLock
log
public void log(java.util.logging.LogRecord record)
- Directs every log call to
log(LogRecord, Object)
And thus the default authorization check does not allow logging
when an application uses this interface.
- Overrides:
log
in class java.util.logging.Logger
- Parameters:
record
- The LogRecord
to be logged
log
public void log(java.util.logging.LogRecord record,
java.lang.Object cred)
- Calls super.log after checking authorization.
Data is not logged at all if this check fails.
- Parameters:
record
- The LogRecord
to be loggedcred
- To prove authorization for log WRITE.
The default authorization hook checks validity of the single
sign on token which should be passed as the cred
.
flush
public void flush()
- Writes all the buffered log records.
getLogger
public static java.util.logging.Logger getLogger(java.lang.String name)
- Find or create a logger for a named subsystem. If a logger has
already been created with the given name it is returned. Otherwise
a new logger is created.
If a new logger is created its log level will be configured
based on the LogManager
and it will be configured NOT to
send logging output to its parent loggers Handlers. It will be
registered in the LogManager
global namespace.
- Parameters:
name
- A name for the logger. This should be a dot-separated name
and should be the file name you want to have for your logs,
such as amSSO.access
or audit.- Returns:
- a suitable
Logger
.
getLogger
public static java.util.logging.Logger getLogger(java.lang.String name,
java.lang.String rbName)
- Find or create a logger for a named subsystem. If a logger has
already been created with the given name it is returned. Otherwise
a new logger is created.
If a new logger is created its log level will be configured
based on the LogManager
and it will configured to also
send logging output to its parent loggers Handlers. It will be
registered in the LogManager
global namespace.
If the named Logger already exists and does not yet have a
localization resource bundle then the given resource bundle
name is used. If the named Logger already exists and has
a different resource bundle name then an
IllegalArgumentException
is thrown.
- Parameters:
name
- A name for the logger. This should be a dot-separated name
and should be the file name you want to have for your logs, such
as amSSO.access
or audit.rbName
- A resource bundle to be used for localizing the log
messages.- Returns:
- logger for a named subsystem.
getCurrentFile
public java.lang.String getCurrentFile()
- Returns the current file to which the logger's handler is writing to.
This is useful only in case of file..
- Returns:
- the current file to which the logger's handler is writing to.
setCurrentFile
public void setCurrentFile(java.lang.String fileName)
- Set the current file to which the logger's handler is writing to.
- Parameters:
fileName
- name of file.