# Logging powerEvents uses [Apache log4net](https://logging.apache.org/log4net/) as core logging library, and additionally [PostSharp Diagnostics](http://doc.postsharp.net/5.0/logging) for extended Debug logging.\ By default, all the logs are stored in a logfile located in *'C:Users\\\{USER}\\AppData\\Local\\coolOrange\\powerEvents\\Logs\\powerEvents.log'* and it contains only Infos, Warnings and Errors.\ The log4net settings file is located in *C:\\Program Files\\coolOrange\\Modules\\powerEvents\\powerEvents.log4net*.\ Further information about log4Net Configurations can be found [here](https://logging.apache.org/log4net/release/manual/configuration.html). ## When to change the logging behavior? When you have issues with failing event execution or when you want to get a more detailed knowledge about what powerEvents or powerVault cmdlets are doing, you can increase the [loglevel](powerjobs_processor:logging/log_level). ```{note} When changing the loglevel to *DEBUG* [PostSharp Diagnostics](http://doc.postsharp.net/5.0/logging) will be enabled and will log all the function calls into the log files. This could cause performance issues ``` ## LogFile You can see, that there are multiple logging-Appenders used. If you want to change the [logging level](powerjobs_processor:logging/log_level) in the logfile, please visit following appender: ```{code-block} xml :lineno-start: 2 ``` In the following lines you see the *LevelRangeFilter* which is currently used. By changing the minimum level to "DEBUG", log entries wih all the levels between the range Debug and Fatal will be written to the logfile. ```{code-block} xml :lineno-start: 21 ``` In the line ```{code-block} xml :lineno-start: 4 ``` you can configure the outputpath and name of the logfile. powerEvents provides it's own [PSHost](https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.host.pshost?view=powershellsdk-1.1.0), for which the logging can be configured in the section: ```{code-block} xml :lineno-start: 64 ``` Following sections are used to control the logging behaviour for the *powerVault Cmdlets*: ```{code-block} xml :lineno-start: 66 ``` ## PowerShell IDE powerShell IDEs like powerShell console (and powerShell ISE) are configured to show the logging levels in a different color.\ In order to customize the logging level in the console window, visit following appender: ### ColoredConsoleAppender *ColoredConsoleAppenders* are working for powerShell IDE's that support console windows. ```{code-block} xml :lineno-start: 27 ``` In the lines ```{code-block} xml :lineno-start: 54 ``` you can configure the required [logging level](powerjobs_processor:logging/log_level). You could set the minimal filter level to "DEBUG", than all the levels between the range Debug and Fatal will be logged.\ This appender allows changing even the colors of the messages, depending on their log level: ```{code-block} xml :lineno-start: 49 ``` ```{note} However the **powerShell ISE** currently does not support [console logs](#coloredconsoleappender) at all.\ When powerVault cmdlet's are getting used *before importing the powerEvents module*, not all the powerVault logging can be redirected to the logger configured in the according [section](#logfile). ```