A logging package for Crestron SimplSharp
$ dotnet add package UXAV.LoggingA Crestron logging solution with built-in console server and custom actions 🙂
GitHub Repository: UXAV.Logging
NuGet Package: UXAV.Logging
To use this test library in your project, follow these steps:
Install the package via NuGet. You can use the following command in the Package Manager Console:
dotnet add [<PROJECT>] package UXAV.Logging
Import the library in your code file:
using UXAV.Logging;
Start using the library's features in your code:
public ControlSystem()
{
// set this true if running a debug build
if(debug)
{
// Set the logger level to log everything!
Logger.Level = Logger.LoggerLevel.Debug;
// Stream everything on the console output
Logger.DefaultLogStreamLevel = Logger.LoggerLevel.Debug;
}
else
{
// Set the logger to ignore debug calls
Logger.Level = Logger.LoggerLevel.Info;
// Only output warnings and above on the console
Logger.DefaultLogStreamLevel = Logger.LoggerLevel.Warning;
}
// Start the console server on port 9091 (if loaded in slot 1)
Logger.StartConsole((int)(9000 + InitialParametersClass.ApplicationNumber));
// Log some stuff
Logger.Log("Hello, world!");
}
TBC
Contributions are welcome! If you would like to contribute to this project, please follow these guidelines:
Please ensure that your code follows the project's coding conventions and includes appropriate tests.
feature/feature-nameThank you for your interest in contributing to this project!
This project is licensed under the MIT License.