-
Notifications
You must be signed in to change notification settings - Fork 50
Console
Massimo Bonvicini edited this page Aug 27, 2019
·
2 revisions
From version 2.3.3 it supports acquiring lock for issues with git prompt that sometimes gets splitted during output.
The mutex name to acquire is ConsoleMtx
> Add-LoggingTarget -Name Console -Configuration @{
Level = <NOTSET> # <Not required> Sets the logging level for this target
Format = <NOTSET> # <Not required> Sets the logging format for this target
ColorMapping = <NOTSET> # <Not required> Overrides the level:color mappings with a [hashtable].
# Only need to specify the levels you wish to override
}
Default Console Colors
$ColorMapping = @{
'DEBUG' = 'Blue'
'INFO' = 'Green'
'WARNING' = 'Yellow'
'ERROR' = 'Red'
}
Each color will be verified against [System.ConsoleColor]
. If it is invalid, an error will appear on the screen along with the orignal message.
Add-LoggingTarget -Name Console -Configuration @{
ColorMapping = @{
DEBUG = 'Gray'
INFO = 'White'
}
}