public class MsgRedirectConsole extends MsgDispatcher
MsgDispatcher
capability.
MsgDispatcher.DispatcherThread
MsgDispatcherCore.Entry, MsgDispatcherCore.Output, MsgDispatcherCore.TestCnt
Modifier and Type | Field and Description |
---|---|
LogMessage |
cmdlineErr
The output channels to console.
|
LogMessage |
cmdlineOut
The output channels to console.
|
static int |
ixMsgOutputFile
Indices to the output channels.
|
static int |
ixMsgOutputStdErr
Indices to the output channels.
|
static int |
ixMsgOutputStdOut
Indices to the output channels.
|
private MsgConfig |
msgConfig |
MsgPrintStream |
printErr
The converter from any output to a message.
|
MsgPrintStream |
printOut
The converter from any output to a message.
|
private java.util.TimeZone |
timeZoneForFile |
static int |
version
Version, history and license.
|
outputConsole
actNrofListIdents, ctLostMessages, entryMsgBufferOverflow, freeOrders, idThreadForDispatching, listBitDst, listIdents, listOrders, mAdd, mConsole, mConsoleQueued, mDispatchBits, mDispatchInCallingThread, mDispatchInDispatcherThread, mDstMixedOutputs, mDstOneOutput, mRemove, mSet, msgText, nrofMixedOutputs, outputs, runNoEntryMessage, testCnt
nLogLevel
dateFormat, debug, error, fineDebug, fineInfo, info, minSecondsFormat, mNeverOutputToDisplay, mReportLevel, sVersion, warning
Constructor and Description |
---|
MsgRedirectConsole()
Initializes the redirection of System.out and System.err in the simplest standard way.
|
MsgRedirectConsole(int identStartOut,
int identStartErr,
int sizeNoGroup,
int sizeGroup,
MainCmd mainCmd,
int maxDispatchEntries,
int maxQueue,
int maxOutputs,
int msgIdentQueueOverflow,
java.lang.Runnable runNoEntryMessage)
Initializes the redirection of System.out and System.err in a full accessible way for Message Dispatching.
|
MsgRedirectConsole(MainCmd mainCmd,
int addOutputs,
java.lang.Runnable runNoEntryMessage)
Initializes the redirection of System.out and System.err in a simple standard way.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
readConfig(java.io.File fileConfig) |
void |
setMsgIdents(MsgConfig src,
java.lang.String chnChars) |
close, flush, getSharedFreeEntries, reportOutput, setDefaults, setOutputFromString, setOutputRange, setOutputRoutine, stop
append, append, append, dispatchMsg, dispatchQueuedMsg, isOnline, searchDispatchBits, sendMsg, sendMsgTime, sendMsgVaList, setIdThreadForMsgDispatching, setMsgTextConverter, tickAndFlushOrClose
flushReport, getReportLevel, getReportLevelFromIdent, report, report, reportln, reportln, setReportLevel, setReportLevelToIdent, writeError, writeError, writeInfo, writeInfoln, writeWarning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
msgSec, timeCurr, timeMsg
public static final int version
MsgRedirectConsole()
for simplest usage.
readConfig(File)
, experience with usage.
MsgPrintStream
to redirect System.out and System.err.
public static final int ixMsgOutputStdOut
public static final int ixMsgOutputStdErr
public static final int ixMsgOutputFile
public final MsgPrintStream printOut
MsgPrintStream.setMsgGroupIdent(String, int, int)
to manipulate the building
of the ident numbers.public final MsgPrintStream printErr
MsgPrintStream.setMsgGroupIdent(String, int, int)
to manipulate the building
of the ident numbers.private final java.util.TimeZone timeZoneForFile
public final LogMessage cmdlineOut
public final LogMessage cmdlineErr
private final MsgConfig msgConfig
public MsgRedirectConsole(int identStartOut, int identStartErr, int sizeNoGroup, int sizeGroup, MainCmd mainCmd, int maxDispatchEntries, int maxQueue, int maxOutputs, int msgIdentQueueOverflow, java.lang.Runnable runNoEntryMessage)
identStartOut
- The message number of auto-generate numbers for first System.outidentStartErr
- The message number of auto-generate numbers for first System.err
if -1 then the System.err is not overridden.sizeNoGroup
- max. number of non-grouped messagessizeGroup
- max. number of messages in a group. See MsgPrintStream.MsgPrintStream(LogMessage, int, int, int)
mainCmd
- An existing implementation especially MainCmd
or its graphical derivation.
This parameter can be null if the MainCmd concept is not used.maxDispatchEntries
- Further parameter see superclass MsgDispatcher
maxQueue
- maxOutputs
- msgIdentQueueOverflow
- runNoEntryMessage
- public MsgRedirectConsole(MainCmd mainCmd, int addOutputs, java.lang.Runnable runNoEntryMessage)
fileOut
- A output for the Message Dispatcher which should act as the log file output.
It is assigned to the ixMsgOutputFile
for dispatching.addOutputs
- 0 or >0 if more outputs are considered.runNoEntryMessage
- Routine which is called on message overflow, can be null.public MsgRedirectConsole()
readConfig(File)
to set associations between the message start texts and numbers
and switch messages on or off depending on their start texts.public void setMsgIdents(MsgConfig src, java.lang.String chnChars)
public java.lang.String readConfig(java.io.File fileConfig)