A AnsiLogger that logs all messages to the PrintStream object found in field System.out. by providing this field to the constructor of its parent class AnsiLogger. See class AnsiLogger for more information on ANSI escape sequences and their use.
The name of the Logger defaults to "ANSI_CONSOLE".
Public Methods | |
AnsiConsoleLogger () | |
AnsiConsoleLogger (String name) | |
Public Methods inherited from AnsiLogger | |
AnsiLogger (PrintStream out, boolean usesStdStreams) | |
AnsiLogger (PrintStream out, boolean usesStdStreams, String name) | |
AnsiLogger (PrintStream out, boolean usesStdStreams, String name, String typeName) | |
Public Methods inherited from TextLogger | |
int | addAcquirer (ThreadLock newAcquirer) |
void | clearReplacements () |
void | log (Domain domain, Verbosity verbosity, ArrayList< Object > logables, ScopeInfo scope) |
int | removeAcquirer (ThreadLock acquirer) |
void | resetAutoSizes () |
void | setReplacement (String searched, String replacement) |
Public Methods inherited from Logger | |
String | getName () |
String | getTypeName () |
String | toString () |
Public Methods inherited from SmartLock | |
SmartLock () | |
int | cntAcquirers () |
Public Methods inherited from ThreadLock | |
ThreadLock () | |
ThreadLock (LockMode lockMode) | |
ThreadLock (LockMode lockMode, Safeness safeness) | |
void | acquire () |
int | dbgCountAcquirements (Thread thread) |
LockMode | getMode () |
Safeness | getSafeness () |
void | release () |
void | setSafeness (Safeness safeness) |
boolean | willRelease () |
Additional Inherited Members | |
Public Static Fields inherited from AnsiLogger | |
static final String | ANSI_BG_BLACK ="\033[40m" |
Select black as background color. | |
static final String | ANSI_BG_BLUE ="\033[44m" |
Select blue as background color. | |
static final String | ANSI_BG_CYAN ="\033[46m" |
Select cyan as background color. | |
static final String | ANSI_BG_GRAY ="\033[48;5;240m" |
Select gray as background color. | |
static final String | ANSI_BG_GREEN ="\033[42m" |
Select green as background color. | |
static final String | ANSI_BG_LIGHT_BLUE ="\033[48;5;12m" |
Select light blue as background color. | |
static final String | ANSI_BG_LIGHT_CYAN ="\033[48;5;14m" |
Select light cyan as background color. | |
static final String | ANSI_BG_LIGHT_GRAY ="\033[48;5;250m" |
Select light gray as background color. | |
static final String | ANSI_BG_LIGHT_GREEN ="\033[48;5;10m" |
Select light green as background color. | |
static final String | ANSI_BG_LIGHT_MAGENTA ="\033[48;5;13m" |
Select light magenta as background color. | |
static final String | ANSI_BG_LIGHT_RED ="\033[48;5;09m" |
Select light red as background color. | |
static final String | ANSI_BG_LIGHT_YELLOW ="\033[48;5;11m" |
Select light yellow as background color. | |
static final String | ANSI_BG_MAGENTA ="\033[45m" |
Select magenta as background color. | |
static final String | ANSI_BG_RED ="\033[41m" |
Select red as background color. | |
static final String | ANSI_BG_STD_COL ="\033[49m" |
Select standard background color. | |
static final String | ANSI_BG_WHITE ="\033[48;5;15m" |
Select white as background color. | |
static final String | ANSI_BG_YELLOW ="\033[43m" |
Select yellow as background color. | |
static final String | ANSI_BLACK ="\033[30m" |
Select black as foreground color. | |
static final String | ANSI_BLUE ="\033[34m" |
Select blue as foreground color. | |
static final String | ANSI_BOLD ="\033[1m" |
Select bold font style. | |
static final String | ANSI_CYAN ="\033[36m" |
Select cyan as foreground color. | |
static final String | ANSI_GRAY ="\033[38;5;240m" |
Select gray as foreground color. | |
static final String | ANSI_GREEN ="\033[32m" |
Select green as foreground color. | |
static final String | ANSI_ITALICS ="\033[3m" |
Select italics font style. | |
static final String | ANSI_LIGHT_BLUE ="\033[38;5;12m" |
Select light blue as foreground color. | |
static final String | ANSI_LIGHT_CYAN ="\033[38;5;14m" |
Select light cyan as foreground color. | |
static final String | ANSI_LIGHT_GRAY ="\033[38;5;250m" |
Select light gray as foreground color. | |
static final String | ANSI_LIGHT_GREEN ="\033[38;5;10m" |
Select light green as foreground color. | |
static final String | ANSI_LIGHT_MAGENTA ="\033[38;5;13m" |
Select light magenta as foreground color. | |
static final String | ANSI_LIGHT_RED ="\033[38;5;09m" |
Select light red as foreground color. | |
static final String | ANSI_LIGHT_YELLOW ="\033[38;5;11m" |
Select light yellow as foreground color. | |
static final String | ANSI_MAGENTA ="\033[35m" |
Select magenta as foreground color. | |
static final String | ANSI_RED ="\033[31m" |
Select red as foreground color. | |
static final String | ANSI_RESET ="\033[0m" |
Reset colors and font style. | |
static final String | ANSI_STD_COL ="\033[39m" |
Select standard foreground color. | |
static final String | ANSI_STD_STYLE ="\033[0m" |
Select standard font style. | |
static final String | ANSI_WHITE ="\033[38;5;15m" |
Select white as foreground color. | |
static final String | ANSI_YELLOW ="\033[33m" |
Select yellow as foreground color. | |
Public Fields inherited from AnsiLogger | |
LightColorUsage | useLightColors |
Public Fields inherited from TextLogger | |
AutoSizes | autoSizes = new AutoSizes() |
ObjectConverter | converter |
String | fmtMsgSuffix ="" |
String | fmtMultiLineMsgHeadline ="ALox: Multi line message follows: " |
String | fmtMultiLinePrefix = ">> " |
String | fmtMultiLineSuffix = null |
MetaInfo | metaInfo = new MetaInfo() |
String | multiLineDelimiter = null |
String | multiLineDelimiterRepl = "\\r" |
int | multiLineMsgMode = 2 |
Public Fields inherited from Logger | |
int | cntLogs |
Ticks | timeOfCreation = new Ticks() |
Ticks | timeOfLastLog = new Ticks() |
Public Fields inherited from ThreadLock | |
int | recursionWarningThreshold = 10 |
int | waitWarningTimeLimitInMillis = 1000 |
Protected Fields inherited from AnsiLogger | |
String[] | ansiCols |
PrintStream | out |
Protected Fields inherited from TextLogger | |
AString | logBuf = new AString( 256 ) |
AString | msgBuf = new AString( 128 ) |
ArrayList< String > | replacements = new ArrayList<String>() |
int | stdStreamLockRegistrationCounter =0 |
boolean | usesStdStreams |
Protected Fields inherited from Logger | |
String | name |
String | typeName |
Protected Fields inherited from SmartLock | |
ArrayList< ThreadLock > | acquirers = new ArrayList<ThreadLock>() |
Protected Fields inherited from ThreadLock | |
int | cntAcquirements |
boolean | createOwnerStackTrace = false |
LockMode | lockMode |
Object | mutex |
Thread | owner |
Exception | ownerException |
Ticks | waitTime = new Ticks() |
Protected Methods inherited from AnsiLogger | |
void | construct (PrintStream ps) |
void | logText (Domain domain, Verbosity verbosity, AString msg, ScopeInfo scope, int lineNumber) |
void | notifyMultiLineOp (Phase phase) |
Protected Methods inherited from TextLogger | |
TextLogger (String name, String typeName, boolean usesStdStreams) | |
Protected Methods inherited from Logger | |
Logger (String name, String typeName) | |
Package Access Methods inherited from ThreadLock | |
void | constructor (LockMode lockMode, Safeness safeness) |
AnsiConsoleLogger | ( | String | name | ) |
Creates an AnsiConsoleLogger with the given name using System.out as PrintStream.
name | (Optional) The name of the Logger, defaults to "ANSI_CONSOLE". |
Creates an AnsiLogger with the name "ANSI" using System.out as PrintStream.