|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRepository.Log
Logging class.
alexis.grandemange@pagebox.net
Copyright (c) 2002-2004 Alexis Grandemange
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License lesser.txt should be included in the distribution.
Field Summary | |
(package private) java.io.PrintWriter |
log
Log file |
private java.lang.String |
logFile
Path of the log file |
private static java.util.HashMap |
logs
Log map Key: path of the log file Value: Log object |
(package private) boolean |
mode
True if information messages |
private java.text.SimpleDateFormat |
sdf
SimpleDateFormat used to build log entries |
Constructor Summary | |
private |
Log(java.lang.String logFile,
boolean mode)
Constructor. |
Method Summary | |
(package private) void |
erase()
Clear the trace |
void |
error(java.lang.String requestor,
java.lang.String host,
java.lang.String msg)
Log an error message |
(package private) static Log |
getLog(java.lang.String logFile,
boolean mode)
Return a Log object from logs. |
(package private) boolean |
getMode()
Get the tracing mode |
(package private) java.io.BufferedReader |
getReader()
Get a Reader on the log file. |
void |
info(java.lang.String requestor,
java.lang.String host,
java.lang.String msg)
Log an information message |
(package private) void |
setMode(boolean mode)
Set the tracing mode |
(package private) void |
warn(java.lang.String requestor,
java.lang.String host,
java.lang.String msg)
Log a warning message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.text.SimpleDateFormat sdf
boolean mode
java.io.PrintWriter log
private java.lang.String logFile
private static java.util.HashMap logs
Constructor Detail |
private Log(java.lang.String logFile, boolean mode)
logFile
- path of the log filemode
- true if information messagesMethod Detail |
static Log getLog(java.lang.String logFile, boolean mode)
java.io.BufferedReader getReader()
final void setMode(boolean mode)
mode
- true if information messagesfinal boolean getMode()
void erase()
public final void info(java.lang.String requestor, java.lang.String host, java.lang.String msg)
requestor
- user who requested the actionhost
- user hostmsg
- messagefinal void warn(java.lang.String requestor, java.lang.String host, java.lang.String msg)
requestor
- user who requested the actionhost
- user hostmsg
- messagepublic final void error(java.lang.String requestor, java.lang.String host, java.lang.String msg)
requestor
- user who requested the actionhost
- user hostmsg
- message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |