Forum Discussion
Jouni Poikolainen
Jan 30, 2017Copper Contributor
OfficeDevPnP.Core Logging
Hi, We are using OfficeDevPnP.Core as reference in out project and would like to have possible loggings forwarded into our own logger. Does anyone know is that possible? For example, lets ass...
- Jan 31, 2017PnP Core uses default .NET Trace class for Logging. That means that you can configure as you usually do when uses Diagnostics.Trace. For instance, if you have a console App using PnPCore, you can add the following to your App.Config file, and any Log do by PnPCore, will be shown in your console:
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener" />
</listeners>
</trace>
</system.diagnostics>
Luis Mañez
Jan 31, 2017MVP
PnP Core uses default .NET Trace class for Logging. That means that you can configure as you usually do when uses Diagnostics.Trace. For instance, if you have a console App using PnPCore, you can add the following to your App.Config file, and any Log do by PnPCore, will be shown in your console:
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener" />
</listeners>
</trace>
</system.diagnostics>
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener" />
</listeners>
</trace>
</system.diagnostics>
Jouni Poikolainen
Jan 31, 2017Copper Contributor
Just what I was looking for. Thanks mate!