Overview
MetroLog.Net6 is a .NET 6 lightweight logging framework designed primarily for mobile platforms like iOS
and Android
.
The intention is that MetroLog is mostly compatible with NLog
. Both the surface area and internal construction
should just about match.
However, to achieve better startup performance, configuration is only possible through code.
Configuration
Configuration is made through the crossing of a target and log levels.
A target specify how the logs will be stored. For example, you can use the DebugTarget
to show your logs in the debug output
Or you could use the FileSnapshotTarget
to store your logs in a file.
The log levels describe the level of criticality. You bind each target to a set of log levels.
Standard configuration
var config = new LoggingConfiguration()
#if RELEASE
config.AddTarget(
LogLevel.Info,
LogLevel.Fatal,
ā¦