Package org.jpedal.utils
Class LogWriter
java.lang.Object
org.jpedal.utils.LogWriter
logs all activity. And some low level variables/methods as it is visible to all classes.
Provided for debugging and NOT officially part of the API
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic Stringfilename of logfilestatic org.jpedal.utils.LogScannerallow user to scan log output -
Method Summary
Modifier and TypeMethodDescriptionstatic voidConvenience method to output a DEBUG level entry to the LogWriterstatic voidConvenience method to output an DEBUG level entry to the LogWriterstatic voidConvenience method to output an ERROR level entry to the LogWriterstatic voidConvenience method to output a ERROR level entry to the LogWriterstatic voidConvenience method to output a INFO level entry to the LogWriterstatic voidConvenience method to output an INFO level entry to the LogWriterstatic voidsetupLogFile(String command_line_values) Method to output initial message to logs and allow log messages to output to console.static voidsetVerbose(boolean verbose) Set if log entries should also be added to the console, regardless of the current log settings.static voidConvenience method to output a TRACE level entry to the LogWriterstatic voidConvenience method to output an WARNING level entry to the LogWriterstatic voidConvenience method to output a WARNING level entry to the LogWriterstatic voidConvenience method to output an WARNING level entry to the LogWriterstatic voidWrite the provided message as a log entry in the current log.static voidwriteLog(System.Logger.Level level, Throwable exception, String message) Construct an entry with the given level, exception, and message and write it out.static voidWrite an entry to the current log with a level of WARNING and a message constructed from the information provided by the throwable provided.
-
Field Details
-
logScanner
public static org.jpedal.utils.LogScanner logScannerallow user to scan log output -
log_name
filename of logfile -
isRunningFromIDE
public static final boolean isRunningFromIDE
-
-
Method Details
-
writeLog
Write an entry to the current log with a level of WARNING and a message constructed from the information provided by the throwable provided.- Parameters:
throwable- A Throwable object used to construct a log entry
-
writeLog
Write the provided message as a log entry in the current log. Level will be set to Trace unless the word exception is found in the message content- Parameters:
message- The message to be added to the log
-
setVerbose
public static void setVerbose(boolean verbose) Set if log entries should also be added to the console, regardless of the current log settings. This will add messages to the console all log messages that are not filtered with the org.jpedal.inclusiveLogFilters system property Messages filtered by the Logger Level will appear in the console.- Parameters:
verbose- A boolean flag to determine if messages should be displayed in the console (true) or not (false)
-
error
Convenience method to output an ERROR level entry to the LogWriter- Parameters:
message- The message to include in the log entry
-
error
Convenience method to output a ERROR level entry to the LogWriter- Parameters:
exception- A Throwable object that will have its message added to the log entrymessage- The message to include in the log entry
-
warning
Convenience method to output a WARNING level entry to the LogWriter- Parameters:
message- The message to include in the log entry
-
warning
Convenience method to output an WARNING level entry to the LogWriter- Parameters:
exception- A Throwable object that will have its message added to the log entrymessage- The message to include in the log entry
-
info
Convenience method to output a INFO level entry to the LogWriter- Parameters:
message- The message to include in the log entry
-
info
Convenience method to output an INFO level entry to the LogWriter- Parameters:
exception- A Throwable object that will have its message added to the log entrymessage- The message to include in the log entry
-
debug
Convenience method to output a DEBUG level entry to the LogWriter- Parameters:
message- The message to include in the log entry
-
debug
Convenience method to output an DEBUG level entry to the LogWriter- Parameters:
exception- A Throwable object that will have its message added to the log entrymessage- The message to include in the log entry
-
trace
Convenience method to output a TRACE level entry to the LogWriter- Parameters:
message- The message to include in the log entry
-
trace
Convenience method to output an WARNING level entry to the LogWriter- Parameters:
exception- A Throwable object that will have its message added to the log entrymessage- The message to include in the log entry
-
writeLog
Construct an entry with the given level, exception, and message and write it out.- Parameters:
level- The level to apply to this log entryexception- An exception if present, this may be set to null if no exception presentmessage- The message to include in the log entry
-
setupLogFile
Method to output initial message to logs and allow log messages to output to console.- Parameters:
command_line_values- A String, if a 'v' character is present messages are output to console.
-