|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.LogFile
public class LogFile
Log-file for debuging messages, warning and errors dumps.
Field Summary | |
---|---|
static boolean |
debugging
Print verbose debug-logs. |
static java.lang.String |
DEFAULT_PROBE
Default probe file name (in Properties format). |
protected static boolean |
empty
Is log-file still empty? |
protected static boolean |
first
Log-file stream was not opened before? |
protected static IntMap<cz.cuni.jagrlib.LogImage> |
images
Collection of log-images. |
protected static long |
lastCollectionCount
|
protected static long |
lastCollectionTime
|
protected static java.io.PrintStream |
logFile
Log-file object. |
static java.lang.String |
logFileName
Log-file name. |
protected static int |
nextId
Image id that will be used next time. |
protected static java.util.Properties |
probe
Property set for "run-time probe". |
static java.lang.String |
SEPARATOR1
|
static java.lang.String |
SEPARATOR2
|
static java.lang.String |
SEPARATOR3
|
static java.util.Date |
startDate
Time of program startup. |
static boolean |
tracing
Trace mode (used externally). |
Constructor Summary | |
---|---|
LogFile()
|
Method Summary | |
---|---|
static boolean |
booleanProperty(java.lang.String key,
boolean def)
Gets value of the given boolean property. |
static void |
close()
Close underlying log-file stream. |
static void |
closeImage(int id)
Closes the log-image (invalidates its id). |
static int |
createImage(int width,
int height,
int mode,
java.lang.String fileName)
Create a new log-image. |
static void |
debug(java.lang.String s)
|
static double |
doubleProperty(java.lang.String key,
double def)
Gets value of the given floating-point property. |
static void |
error(java.lang.String s)
|
static void |
exception(java.lang.String s,
java.lang.Throwable ex)
Writes exception dump (with stack trace). |
static void |
exception(java.lang.Throwable ex)
Writes exception dump (with stack trace). |
static RasterGraphics |
getImage(int id)
Retrieves RasterGraphics object from log-image is. |
protected static boolean |
checkProlog()
Checks if the log-file was already initialized. |
static int |
intProperty(java.lang.String key,
int def)
Gets value of the given integer property. |
static void |
log(java.lang.String s)
|
static void |
memoryStatistics()
Prints memory statistics: heap statistics & garbage-collection statistics. |
protected static void |
printTime()
Prints time relative to program startup (in millisecond-resolution). |
static boolean |
readProbe(java.lang.String fileName)
Reads the given "probe" into property set, returns true if succeeded. |
static void |
resetMemoryStatistics()
Reset cummulative memory statistics (garbage collector statistics). |
static void |
saveImage(int id)
Save the given log-image. |
static java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
Sets new value of the general ( String ) property. |
static void |
stackTrace(java.lang.String s)
|
static java.lang.String |
stringProperty(java.lang.String key)
Gets value of the general ( String ) property. |
static void |
warning(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean debugging
public static boolean tracing
protected static java.io.PrintStream logFile
protected static boolean empty
protected static boolean first
public static java.lang.String logFileName
public static java.util.Date startDate
protected static java.util.Properties probe
public static final java.lang.String DEFAULT_PROBE
Properties
format).
public static final java.lang.String SEPARATOR1
public static final java.lang.String SEPARATOR2
public static final java.lang.String SEPARATOR3
protected static long lastCollectionCount
protected static long lastCollectionTime
protected static int nextId
protected static IntMap<cz.cuni.jagrlib.LogImage> images
Constructor Detail |
---|
public LogFile()
Method Detail |
---|
protected static boolean checkProlog()
public static void close()
public static void exception(java.lang.Throwable ex)
ex
- Throwable holding stack-trace.public static void exception(java.lang.String s, java.lang.Throwable ex)
s
- Additional message.ex
- Throwable holding stack-trace.public static void log(java.lang.String s)
public static void warning(java.lang.String s)
public static void error(java.lang.String s)
public static void debug(java.lang.String s)
public static void stackTrace(java.lang.String s)
protected static void printTime()
public static void resetMemoryStatistics()
public static void memoryStatistics()
public static boolean readProbe(java.lang.String fileName)
public static java.lang.Object setProperty(java.lang.String key, java.lang.String value)
String
) property.
public static java.lang.String stringProperty(java.lang.String key)
String
) property. Returns null if not found.
public static int intProperty(java.lang.String key, int def)
public static double doubleProperty(java.lang.String key, double def)
public static boolean booleanProperty(java.lang.String key, boolean def)
public static int createImage(int width, int height, int mode, java.lang.String fileName)
public static RasterGraphics getImage(int id)
RasterGraphics
object from log-image is.
public static void saveImage(int id)
public static void closeImage(int id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |