Package org.compiere.util
Class CLogFile
java.lang.Object
java.util.logging.Handler
org.compiere.util.CLogFile
Handler that publish log record to server log file
- Version:
- $Id: CLogFile.java,v 1.3 2006/07/30 00:54:35 jjanke Exp $
- Author:
- Jorg Janke
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close log filevoid
flush()
Flush outputstatic CLogFile
Get or create CLogFile handler.Get File Namestatic String
getFileNameDate
(long time) Get File Name Date portionstatic String
getFileNameDateTime
(long time) Get File Name DateTime portionGet Log Directoryvoid
Publish log recordvoid
reopen()
Re-use previous log file (if available).void
Rotate Log file.
Called after Initialization.void
Set LeveltoString()
String RepresentationMethods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter
-
Constructor Details
-
CLogFile
Constructor- Parameters:
idempiereHome
- idempiere homecreateLogDir
- create log directory if missingisClient
- client
-
-
Method Details
-
getFileNameDate
Get File Name Date portion- Parameters:
time
- time in ms- Returns:
- Date String
-
getFileNameDateTime
Get File Name DateTime portion- Parameters:
time
- time in ms- Returns:
- DateTime String on Seconds
-
rotateLog
public void rotateLog()Rotate Log file.
Called after Initialization. -
reopen
public void reopen()Re-use previous log file (if available). -
getFileName
Get File Name- Returns:
- file name
-
getLogDirectory
Get Log Directory- Returns:
- log directory or null
-
setLevel
Set Level- Overrides:
setLevel
in classHandler
- Parameters:
newLevel
- new Level- Throws:
SecurityException
- See Also:
-
publish
Publish log record -
flush
public void flush()Flush output -
close
Close log file- Specified by:
close
in classHandler
- Throws:
SecurityException
- See Also:
-
toString
String Representation -
get
Get or create CLogFile handler.- Parameters:
create
-idempiereHome
-isClient
-- Returns:
- CLogFile handler
-