LogMe library for .Net Framework.
Nuget 1.0.0
Install from Package Manager:
Install-Package LogMeLib -Version 1.0.0
Or install from .Net CLI
dotnet add package LogMeLib --version 1.0.0
Step 1. You need a Mqtt broker server, there are many free servers such as mqtt.eclipse.org, test.mosquitto.org, broker.hivemq.com... (see more here)
Step 2. In your Main
method or main window, start new instance of LogMe
:
static LogMe logMe;
static void Main()
{
StartLogMe();
...................
StopLogMe();
}
static async void StartLogMe()
{
logMe = new LogMe("ws://mqtt.eclipse.org:80/mqtt");
await logMe.StartAsync();
}
static async void StopLogMe()
{
await logMe.StopAsync();
}
Step 3. Use LogMeLib.Logger
to write logs.
Logger.I("MainActivity", "This is a simple info log");// Logger.i("This is a simple info log");
Logger.D("MainActivity", "This is a simple debug log");// Logger.i("This is a simple debug log");
Logger.E("MainActivity", "This is a simple error log", throwable);// Logger.i("This is a simple error log", throwable);