> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logging in NetServer

> Introduction to the ILogger-based plugin system for logging in NetServer.

NetServer has switched from using a baked-into-the-code logger to using an extensible plugin system of [ILogger][1] based loggers.

The old logger now lives in *SuperOffice.Logging.dll* but you can remove it, replace it, or add more loggers alongside it.

All the logger plugins are used - there is no preferential treatment among the ILoggers.

For web applications, ASP.NET will load all the DLLs in the *bin* folder automatically.

For console applications, you will need to add the plugins to the `<DynamicLoad>` section or add explicit references to
make sure the DLLs are loaded and found by the class factory.

```xml theme={null}
<Factory>
  <DynamicLoad>
    <add key="Logging" value="SuperOffice.Logging.dll" />
  </DynamicLoad>
</Factory>
```

## Configuration

NetServer uses its own [Diagnostics config section][2] to determine what information to send to the ILoggers.

```xml theme={null}
<Diagnostics>
  <add key="LogWarning" value="false" />
</Diagnostics>
```

With the above section, your logger plugin will not see any warnings, no matter what you specify in the logger's configuration.

## Log levels

The NetServer config supports the following log levels, in descending order:

* Error
* Warning
* Information
* Debug
* Trace

These can be turned on or off individually:

```xml theme={null}
<Diagnostics>
  <add key="LogError" value="true" />
  <add key="LogWarning" value="false" />
  <add key="LogInformation" value="false" />
  <add key="LogDebug" value="true" />
  <add key="LogTrace" value="false" />
</Diagnostics>
```

This will log **Error** and **Debug** messages, but not Warning, Information, or Trace messages.

<Tip>
  You can also [filter the logs][3].
</Tip>

## ILogger options

* [Use the standard NetServer logger][4]
* [Use Serilog][5]
* [Create a custom logger][6]

[1]: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger

[2]: ../config/diagnostics

[3]: ./filter-logs

[4]: ./standard-netserver-log

[5]: ./serilog

[6]: ./create-custom-logger


## Related topics

- [Logging in NetServer](/en/onsite/logging/index.md)
- [Debug](/en/onsite/debug/index.md)
- [NetServer Diagnostics element](/en/onsite/web-config/diagnostics.md)
- [NetServer configuration](/en/onsite/web-config/index.md)
- [Debug Web client](/en/onsite/debug/web-client.md)
- [NetServer Architecture Deep Dive](/en/api/overview/netserver.md)
- [Debug Win client](/en/onsite/debug/win-client.md)
