Version: next

LogLevel

This page describes which log levels are supported and when to use which log level.

Supported Log Levels

idLevelDescription
0verboseThis log level contains detailed message(including sensitive information) and it is not recommended to use in production
1debugThis is for development and debugging
2informationThis is widely used to track your script's or application's execution flow
3warningThis is used to log abnormal or unexpected events
4errorTo log exceptions which cannot be handled by user code
5criticalIndicates application/script failure and needs immediate attention
info

If you modify PowerShell Preference Variables then above information will be less valid

LogLevel Precedence

LogLevel precedence helps you to configure which messages you want to log. Example - If you configure LogLevel property as information for Console provider then Console provider will ignore all the messages which has id value less than information log level's id. In above table information has id 2 so, "verbose" and "debug" log messages will get ignored.

Last updated on by Ganesh Raskar