Package org.compiere.util
Class CLogFile
- java.lang.Object
-
- java.util.logging.Handler
-
- org.compiere.util.CLogFile
-
public class CLogFile extends Handler
idempiere Log File Handler- Version:
- $Id: CLogFile.java,v 1.3 2006/07/30 00:54:35 jjanke Exp $
- Author:
- Jorg Janke
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closevoid
flush()
Flushstatic CLogFile
get(boolean create, String idempiereHome, boolean isClient)
String
getFileName()
Get File Namestatic String
getFileNameDate(long time)
Get File Name Date portionstatic String
getFileNameDateTime(long time)
Get File Name DateTime portionFile
getLogDirectory()
Get Log Directoryvoid
publish(LogRecord record)
Publishvoid
reopen()
void
rotateLog()
Rotate Log Called after Initializationvoid
setLevel(Level newLevel)
Set LevelString
toString()
String Representation-
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter
-
-
-
-
Constructor Detail
-
CLogFile
public CLogFile(String idempiereHome, boolean createLogDir, boolean isClient)
Constructor- Parameters:
idempiereHome
- idempiere homecreateLogDir
- create log directory if missingisClient
- client
-
-
Method Detail
-
getFileNameDate
public static String getFileNameDate(long time)
Get File Name Date portion- Parameters:
time
- time in ms- Returns:
- Date String
-
getFileNameDateTime
public static String getFileNameDateTime(long time)
Get File Name DateTime portion- Parameters:
time
- time in ms- Returns:
- DateTime String on Seconds
-
rotateLog
public void rotateLog()
Rotate Log Called after Initialization
-
reopen
public void reopen()
-
getFileName
public String getFileName()
Get File Name- Returns:
- file name
-
getLogDirectory
public File getLogDirectory()
Get Log Directory- Returns:
- log directory or null
-
setLevel
public void setLevel(Level newLevel) throws SecurityException
Set Level- Overrides:
setLevel
in classHandler
- Parameters:
newLevel
- new Level- Throws:
SecurityException
- See Also:
Handler.setLevel(java.util.logging.Level)
-
publish
public void publish(LogRecord record)
Publish- Specified by:
publish
in classHandler
- Parameters:
record
- log record- See Also:
Handler.publish(java.util.logging.LogRecord)
-
flush
public void flush()
Flush- Specified by:
flush
in classHandler
- See Also:
Handler.flush()
-
close
public void close() throws SecurityException
Close- Specified by:
close
in classHandler
- Throws:
SecurityException
- See Also:
Handler.close()
-
toString
public String toString()
String Representation
-
-