Configuration: Diagnostics Module ‐ Logging - ChrisMavrommatis/Binacle.Net GitHub Wiki

Binacle.Net utilizes Serilog for its logging framework, offering flexible and structured logging capabilities. Although Serilog is a powerful library with many advanced features, Binacle.Net supports a predefined subset of its functionality. It is highly recommended to use the provided configuration and avoid adding unsupported Serilog features to ensure stable operation.

Default Logging Behavior

Binacle.Net's default setup logs to both Console and File outputs. This ensures that log data is available both in real-time and for historical review.

  • Console: Logs are output to the standard console for immediate visibility.
  • File: Logs are written daily to the directory app/data/logs/ with the format log-{date}.txt, with a 7-day rolling retention policy. Log files older than seven days are automatically deleted, ensuring that only recent logs are retained without manual intervention.

Cloud Providers

When cloud providers are enabled, Binacle.Net automatically extends logging to these platforms in addition to the default logging outputs.

Currently supported:

  • Azure Application Insights: When configured, logs are sent to Application Insights for enhanced monitoring and analysis in cloud environments.