/Serilog-Crestron

Primary LanguageC#Apache License 2.0Apache-2.0

Serilog Crestron Repository

A collection of sinks, enrichers, and extensions used to create structured logging on Crestron Automation Platform for Audio And Video integration.

It provides the following sinks:

The Following Enrichers

  • SlotNo. Injects a property containing the Slot Id or the Room Id of the running application.
  • ProgramName. Injects a property containing the Program Name of the running application.

The Following Extensions:

  • FromHere. Extension that provide three ForContext Properties:
    • FileName: Log event property that contains the running code internal File Name.
    • MemberName: Log event property that contains the running code Member Name (Executing Method)
    • LineNumber: Log event property that contains the running code internal Line Number.

Logger configuration can easily be achieved by using Serilog Configuration packages:

These packages were designed for regular .NET applications (Microsoft Console, WinForms, etc), so a couple of adjustments are needed to work under Crestron.

Getting started

There is a SIMPL# Pro project under the sample Directory that you can reference. You can also download the compiled project (CrestronLoggingDemo.cpz) and push into a 4-series processor or VC4.

Contributing

See Contributing.md

Build Notes

The MSBUILD on this project has been converted to SDK, to simplify package maintenance. This project borrows the code for its CrestronConsole from Serilog.Sinks.Console

Copyright © All Contributers - Provided under the Apache License, Version 2.0.