This is a wrapper class for java.util.logging. It is used when messages need to be logged through java.util.logging.
SessionLog, AbstractSessionLog, SessionLogEntry, Session
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| public static final String | |
| private static final Level[] | levels
Stores all the java.util.logging.Levels. |
| protected static final String | |
| private final Map | nameSpaceMap
Represents the HashMap that stores all the name space strings. |
| public static final String | |
| private Logger | sessionLogger
Stores the Logger for session namespace, i.e. " |
| private String | sessionNameSpace
Stores the namespace for session, i.e." |
| public static final String | TOPLINK_NAMESPACE
Stores the default session name in case there is the session name is missing. |
| protected static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public Object | clone()
Overrides org. Implements org. |
| public Map | |
| protected Level | getJavaLevel(int level)
INTERNAL: Return the corresponding java.util.logging.Level for a given TopLink level. |
| public int | Returns: the effective log level.the string representation of a EclipseLink category, e.g. "sql", "transaction" ... category)Overrides org. Implements org. Return the effective log level for the name space extracted from session and category. |
| protected Logger | |
| protected String | getNameSpaceString(String category)
INTERNAL: Return the name space for the given category from the map. |
| protected void | internalLog(SessionLogEntry
SessionLogEntry that holds all the information for a TopLink logging event entry, Level the message level javaLevel, Logger logger)INTERNAL: Build a LogRecord |
| public void | log(SessionLogEntry
SessionLogEntry that holds all the information for a TopLink logging event entry)Implements abstract org. Implements org. Log a SessionLogEntry |
| public void | setLevel(final int
the new log level level, String the string representation of an EclipseLink category, e.g. "sql", "transaction" ... category)Overrides org. Implements org. Set the log level to a logger with name space extracted from the given category. |
| public void | setSession(Session
a Session session)Overrides org. Implements org. Set the session and session namespace. |
| public void | setWriter(OutputStream
the file output stream will receive the formatted log entries. fileOutputStream)Overrides org. Set the output stream that will receive the formatted log entries. |
| public boolean | Returns: true if the given message level will be loggedthe log request level level, String the string representation of an EclipseLink category, e.g. "sql", "transaction" ...* category)Overrides org. Implements org. Check if a message of the given level would actually be logged by the logger with name space built from the given session and category. |
| public void | throwing(Throwable
a throwable throwable)Overrides org. Implements org. Log a throwable. |
| categoryloggers | back to summary |
|---|---|
| private final Map<String, Logger> categoryloggers | |
| DEFAULT_TOPLINK_NAMESPACE | back to summary |
|---|---|
| public static final String DEFAULT_TOPLINK_NAMESPACE | |
| levels | back to summary |
|---|---|
| private static final Level[] levels Stores all the java.util.logging.Levels. The indexes are TopLink logging levels. | |
| LOGGING_LOCALIZATION_STRING | back to summary |
|---|---|
| protected static final String LOGGING_LOCALIZATION_STRING | |
| nameSpaceMap | back to summary |
|---|---|
| private final Map<String, String> nameSpaceMap Represents the HashMap that stores all the name space strings. The keys are category names. The values are namespace strings. | |
| SESSION_TOPLINK_NAMESPACE | back to summary |
|---|---|
| public static final String SESSION_TOPLINK_NAMESPACE | |
| sessionLogger | back to summary |
|---|---|
| private Logger sessionLogger Stores the Logger for session namespace, i.e. " | |
| sessionNameSpace | back to summary |
|---|---|
| private String sessionNameSpace Stores the namespace for session, i.e." | |
| TOPLINK_NAMESPACE | back to summary |
|---|---|
| public static final String TOPLINK_NAMESPACE Stores the default session name in case there is the session name is missing. | |
| TRACE_LOCALIZATION_STRING | back to summary |
|---|---|
| protected static final String TRACE_LOCALIZATION_STRING | |
| JavaLog | back to summary |
|---|---|
| public JavaLog() INTERNAL: | |
| addLogger | back to summary |
|---|---|
| protected void addLogger(String loggerCategory, String loggerNameSpace) INTERNAL: Add Logger to the categoryloggers. | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides org. Implements org. INTERNAL: Each session owns its own session log because session is stored in the session log
| |
| getCategoryLoggers | back to summary |
|---|---|
| public Map INTERNAL: Return catagoryloggers | |
| getJavaLevel | back to summary |
|---|---|
| protected Level getJavaLevel(int level) INTERNAL: Return the corresponding java.util.logging.Level for a given TopLink level. | |
| getLevel | back to summary |
|---|---|
| public int getLevel(String category) Overrides org. Implements org. PUBLIC: Return the effective log level for the name space extracted from session and category. If a Logger's level is set to be null then the Logger will use an effective Level that will be obtained by walking up the parent tree and using the first non-null Level.
| |
| getLogger | back to summary |
|---|---|
| protected Logger getLogger(String category) INTERNAL: Return the Logger for the given category | |
| getNameSpaceString | back to summary |
|---|---|
| protected String getNameSpaceString(String category) INTERNAL: Return the name space for the given category from the map. | |
| internalLog | back to summary |
|---|---|
| protected void internalLog(SessionLogEntry entry, Level javaLevel, Logger logger) INTERNAL: Build a LogRecord
| |
| log | back to summary |
|---|---|
| public void log(SessionLogEntry entry) Implements abstract org. Implements org. PUBLIC: Log a SessionLogEntry
| |
| setLevel | back to summary |
|---|---|
| public void setLevel(final int level, String category) Overrides org. Implements org. PUBLIC: Set the log level to a logger with name space extracted from the given category.
| |
| setSession | back to summary |
|---|---|
| public void setSession(Session session) Overrides org. Implements org. PUBLIC: Set the session and session namespace. | |
| setWriter | back to summary |
|---|---|
| public void setWriter(OutputStream fileOutputStream) Overrides org. PUBLIC: Set the output stream that will receive the formatted log entries.
| |
| shouldLog | back to summary |
|---|---|
| public boolean shouldLog(int level, String category) Overrides org. Implements org. PUBLIC: Check if a message of the given level would actually be logged by the logger with name space built from the given session and category. Return the shouldLog for the given category from
| |
| throwing | back to summary |
|---|---|
| public void throwing(Throwable throwable) Overrides org. Implements org. PUBLIC: Log a throwable. | |