This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Allows change of color for the specified log level.
Syntax
' SET
<cAppLog>.Console.Color = logLevel, foregroundColor, backgroundColor
' GET
consoleColor = <cAppLog>.Console.Color(logLevel)
Returns
Color encoded as 32 bit number. See the example how to decode.
Parameters
Name |
Type |
Optional |
Meaning |
logLevel |
Number |
No |
Please use one of the defined equates: %appLog_Level_Trace %appLog_Level_Debug %appLog_Level_Info %appLog_Level_Warn %appLog_Level_Error %appLog_Level_Fatal
|
foregroundColor |
Number |
No (SET) |
Color of the text foreground in console. Please use the console color equates.
|
backgroundColor |
Number |
No (SET) |
Color of the text background in console. Please use the console color equates.
|
Remarks
It does not require explicit use of the Console module.
Restrictions
See also
Examples
uses "AppLog"
dim myLog as new cAppLog
myLog.Console.Active = %true
' Yellow text on red background
myLog.Console.Color = %APPLOG_LEVEL_ERROR, %CColor_Yellow, %CColor_LightRed
' Reading the value back (will be displayed as number)
msgbox 0, "Foreground: " + lo(integer, myLog.Console.Color(%APPLOG_LEVEL_ERROR)) + $CRLF +
"Background: " + hi(integer, myLog.Console.Color(%APPLOG_LEVEL_ERROR))
myLog.Log.Trace("AppLog this is a Trace level text")
myLog.Log.Debug("AppLog this is a Debug level text")
myLog.Log.Info("AppLog this is a Info level text")
myLog.Log.Warn("AppLog this is a Warn level text")
myLog.Log.Error("AppLog this is a Error level text")
myLog.Log.Fatal("AppLog this is a Fatal level text")
sleep 1000