# Logging

powerFLC uses Apache log4net as core logging library, and additionally PostSharp Diagnostics for extended Debug logging.

By default, all the logs are stored in a logfile located in ‘C:\Users\{USER}\AppData\Local\coolOrange\powerFLC\Logs\powerFLC.log’ and it contains only Infos, Warnings and Errors.

The log4net settings file is located in C:\Program Files\coolOrange\Modules\powerFLC\powerFLC.log4net.
Further information about log4Net Configurations can be found here.

You can change the logging behavior of:

## When to change the logging behavior?

When you have issues or when you want to get a more detailed knowledge about what went wrong, you can increase the Logging Levels.

Note

When changing the loglevel to DEBUG PostSharp Diagnostics will be enabled and will log all the function calls into the log files. This could cause performance issues

Additionally you can change the logfile location or integrate the logging mechanism into your administrative environment by using build in EventLogMessages etc.

## Workflows

When you need to get more details of errors that happen for Sample or Custom Workflows, this are the right places to increasing the Logging Levels.

Since workflows consists of powerJobs Processor Jobs, they are writing directly to the powerJobs Processor - Trace Window and its LogFile located in ‘C:\Users\{USER}\AppData\Local\coolOrange\powerJobs Processor\Logs\powerJobs Processor.log’ by default.
Therefore the powerJobs - JobProcessor Addin sections are the right places where you want to configure the logging behavior for workflow jobs like Sample.TransferItemBOMs.

The following sections are used to control the logging behavior for the powerFLC Cmdlets.

 63 64 65 66 67 68  ... ... 

Both of them make use of the following main LogAppender by default:

### LogFile

The FileAppender is the main appender and most loggers us it:

 4  

If you want to change the Logging Levels for the logfile, please visit in the configuration file in the lines:

 57 58 59 60 61  

In that root element, you can configure the logginglevel for all appenders. You could set the level to “DEBUG”, than all the appenders will log in debug.
In the line

 6  

you can configure the outputpath and name of the logfile.

Following section is used to control the logging behaviour for the powerFLC Menu in Vault:

 62  

Only the LogFile appender is used.

## PowerShell IDE

When using the powerFLC cmdlets in powerShell environments, or when debugging or creating workflows in powerShell IDEs, all the logs that would be shown in the powerJobs Processor - Trace Window are written into the powerShell console window.

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.

 24  

In the lines

 51 52 53 54  

you can configure the required Logging Levels. You could set the minimal filter level to “DEBUG”, than all the levels between the range Debug and Fatal will be logged.

We are using a ColoredConsoleAppender, therefore you could also change the colors of the messages, depending on their log level:

 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41  

Troubleshooting

However the powerShell ISE currently does not support console logs at all.