ALox  V. 2402 R. 0
Home ALox for C++ ALox for C# ALox for Java Download
Public Static Fields | Public Static Methods | List of all members
ESC Class Reference

Class Description


This class defines "escape sequences" that influence the formatting of log output. Specific implementations of class Logger have to convert or interpret this classes definitions of escape sequences when processing log data. If no formatting of the output is supported by a specific Logger implementation, such logger should filter and discard escape sequences defined here.

The sequences are similar to ANSI Escape sequences and logger classes that log to 'VT100' compatible terminals will simply convert them.

The name of the class was intentionally chosen to be short, because the escape codes defined with this class will be concatenated to log strings like that:

Log.info( "The result is: ", ESC.RED, 42 );
Note
With the introduction of own, ALox specific escape codes, software that uses ALox becomes independent from any underlying, platform-specific sequences. For example, ALox is not relying on ANSI color codes, which are not supported by colorful Windows consoles. Instead, on each platform, dedicated Loggers will perform the translation of ALox codes to platform-specific ones.

Public Static Fields

static final String BG_BLACK = "\033C6"
 Select red color for background.
 
static final String BG_BLUE = "\033C3"
 Select blue color for background.
 
static final String BG_CYAN = "\033C5"
 Select blue color for background.
 
static final String BG_GRAY = "\033C8"
 Select gray color for background.
 
static final String BG_GREEN = "\033C1"
 Select green color for background.
 
static final String BG_MAGENTA = "\033C4"
 Select blue color for background.
 
static final String BG_RED = "\033C0"
 Select red color for background.
 
static final String BG_RESET = "\033C9"
 Select std color for background.
 
static final String BG_WHITE = "\033C7"
 Select blue color for background.
 
static final String BG_YELLOW = "\033C2"
 Select yellow color for background.
 
static final String BLACK = "\033c6"
 Select black color for foreground.
 
static final String BLUE = "\033c3"
 Select blue color for foreground.
 
static final String BOLD = "\033sB"
 Select bold font style.
 
static final String CYAN = "\033c5"
 Select cyan color for foreground.
 
static final String EOMETA = "\033A0"
 End of meta information in log string.
 
static final String FG_RESET = "\033c9"
 Select std color for foreground.
 
static final String GRAY = "\033c8"
 Select gray color for foreground.
 
static final String GREEN = "\033c1"
 Select green color for foreground.
 
static final String ITALICS = "\033sI"
 Select italics font style.
 
static final String MAGENTA = "\033c4"
 Select magenta color for foreground.
 
static final String RED = "\033c0"
 Select red color for foreground.
 
static final String RESET = "\033sa"
 Reset color and style.
 
static final String STYLE_RESET = "\033sr"
 Select standard font style.
 
static final String TAB = "\033t0"
 
static final String URL_END = "\033lE"
 Mark the end of an URL.
 
static final String URL_START = "\033lS"
 Mark the start of an URL.
 
static final String WHITE = "\033c7"
 Select white color for foreground.
 
static final String YELLOW = "\033c2"
 Select yellow color for foreground.
 

Public Static Methods

static void replaceToReadable (AString target, int startIdx)
 

Member Function Documentation

◆ replaceToReadable()

static void replaceToReadable ( AString  target,
int  startIdx 
)
static

Replaces ESC codes in a string reversely to "ESC.XXX".

Parameters
targetThe string to replace in.
startIdxThe index to start searching for ESC codes.

Member Data Documentation

◆ TAB

final String TAB = "\033t0"
static

Go to next tab. Usually, text loggers will increase the tab position automatically.


The documentation for this class was generated from the following file: