ConsoleWriter Module
Writes plain, info, warning, error, debug and question messages to the console in colors. Each message is written under one lock, so messages from concurrent threads do not mix. A debug message is written only when the setting GENPRES_DEBUG is 1.
Types and nested modules
| Type/Module | Description |
|
Holds the console message functions with the message text as the last argument. |
|
|
Holds the console message functions writing a message as a line without the current time. |
|
|
Holds the console message functions writing a message as a line with the current time in front. |
|
|
|
|
|
A piece of text with the colours it is written in. |
Functions and values
| Function or value |
Description
|
|
|
|
|
Full Usage:
ConsoleWriter.segment frontColor backColor text
Parameters:
ConsoleColor
backColor : ConsoleColor
text : string
Returns: Segment
|
Returns the segment of a text in the given colours.
|
Full Usage:
ConsoleWriter.setColors frontColor backgroundColor
Parameters:
ConsoleColor
backgroundColor : ConsoleColor
|
Set the colors for the console
|
|
Returns the segment of a text in the standard colours.
|
|
|
Full Usage:
ConsoleWriter.timeToWrite writeTime
Parameters:
bool
Returns: DateTime option
|
|
Full Usage:
ConsoleWriter.writeColoredText symbol text frontColor backgroundColor writeLine writeCurrentTime
Parameters:
string option
text : string
frontColor : ConsoleColor
backgroundColor : ConsoleColor
writeLine : bool
writeCurrentTime : bool
|
|
Full Usage:
ConsoleWriter.writeColoredTextWithStandardBackColor text frontColor writeLine writeCurrentTime
Parameters:
string
frontColor : ConsoleColor
writeLine : bool
writeCurrentTime : bool
|
|
Full Usage:
ConsoleWriter.writeDebugMessage text arg2 writeTime
Parameters:
string
arg1 : bool
writeTime : bool
|
|
Full Usage:
ConsoleWriter.writeErrorMessage text writeLine writeTime
Parameters:
string
writeLine : bool
writeTime : bool
|
|
Full Usage:
ConsoleWriter.writeInfoMessage text writeLine writeTime
Parameters:
string
writeLine : bool
writeTime : bool
|
|
Full Usage:
ConsoleWriter.writeQuestionMessage text writeLine writeTime
Parameters:
string
writeLine : bool
writeTime : bool
|
|
Full Usage:
ConsoleWriter.writeSegments writeLine segments
Parameters:
bool
segments : Segment seq
|
Writes the segments to the console one after the other, each in its colours, and ends the line when writeLine is true. The segments are written under one lock, so text that another thread writes with this module never lands between them.
|
Full Usage:
ConsoleWriter.writeText text writeLine writeTime
Parameters:
string
writeLine : bool
writeTime : bool
|
|
Full Usage:
ConsoleWriter.writeWarningMessage text arg2 writeTime
Parameters:
string
arg1 : bool
writeTime : bool
|
|
GenPRES