Class ConsoleLog
java.lang.Object
com.mcpdbwizard.pub.GenericLog
com.mcpdbwizard.pub.ConsoleLog
- All Implemented Interfaces:
LogInterface
This is a lightweight implementation of
LogInterface that uses standard output for information messages and standard error
for everything else. Requests for modal messages and logged messages
are accepted and then ignored.
See LogInterface
Copyright 2003-2026 ATB Consultancy Services Ltd (formerly Orinda Software Ltd, Dublin, Ireland)
- Version:
- 7
- Author:
- devteam@mcpdbwizard.com
-
Field Summary
FieldsFields inherited from class com.mcpdbwizard.pub.GenericLog
autoFlush, autoLog, debugMessagesPrinted, LOG_BEING_FLUSHED, printThreadIdFields inherited from interface com.mcpdbwizard.pub.LogInterface
DEBUG, DEFAULT_FIELD_DELIMITER, DEFAULT_FILENAME_DAY_FORMAT, DEFAULT_FILENAME_TIME_FORMAT, DEFAULT_TIME_FORMAT_STRING, ERROR, INFO, SYSERR, WARN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()This is required byLogInterfacebut is not used in the implementation.This is required byLogInterfacebut is not used in the implementation.voidsetAutoFlush(boolean flushEveryMessage) This is required byLogInterfacebut is not used in the implementation.protected voidwriteMessage(String messageType, String messageText, boolean isModal, boolean isLogged) Format a message and write it to either Standard Output(INFO messages) or Standard Error (eEverything else)Methods inherited from class com.mcpdbwizard.pub.GenericLog
debug, debug, debugOff, debugOn, error, error, error, error, formatMessage, getDateFormat, getDebug, info, info, setAutoLog, syserror, syserror, syserror, syserror, warning, warning
-
Field Details
-
PRESS_ENTER
-
-
Constructor Details
-
ConsoleLog
public ConsoleLog()Create an instance of ConsoleLog.
-
-
Method Details
-
writeMessage
protected void writeMessage(String messageType, String messageText, boolean isModal, boolean isLogged) Format a message and write it to either Standard Output(INFO messages) or Standard Error (eEverything else)- Specified by:
writeMessagein classGenericLog- Parameters:
messageType- should be one of the constants DEBUG, INFO, WARN, ERROR or SYSERR as defined in LogInterface.messageText- The messageisModal- ignored as we are dumping messages to the console.isLogged- ignored as we are dumping messages to the console.
-
setAutoFlush
public void setAutoFlush(boolean flushEveryMessage) This is required byLogInterfacebut is not used in the implementation.- Specified by:
setAutoFlushin interfaceLogInterface- Overrides:
setAutoFlushin classGenericLog- Parameters:
flushEveryMessage-trueif the log is to be flushed every time a message is written to it.
-
flush
public void flush()This is required byLogInterfacebut is not used in the implementation.- Specified by:
flushin interfaceLogInterface- Specified by:
flushin classGenericLog
-
getCurrentLog
This is required byLogInterfacebut is not used in the implementation.- Specified by:
getCurrentLogin interfaceLogInterface- Specified by:
getCurrentLogin classGenericLog- Returns:
- A full path name if a conventional log file is in use, or a descriptive string if no log file is in use.
-