-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
Thev2Andy edited this page Mar 22, 2024
·
9 revisions
Important
The wiki is no longer being maintained, and is now kept as historical reference. (And will be removed in the future.)
using System;
using PowerLog; // Don't forget to import the DLL.
namespace LogSample
{
class Program
{
static void Main(string[] args)
{
Logger.OnLog += OnLog;
LogSession.WriteInLogFile = true;
LogSession.LogSizeThreshold = 5000000;
LogSession.Initialize();
Log:
Logger.Log("Hello PowerLog!", LogType.Null, false, false, true, null);
System.Threading.Tasks.Task.Delay(1);
goto Log;
}
public static void OnLog(object Sender, LogEventArgs LogArgs)
{
Console.WriteLine(LogArgs.LogMessage);
}
}
}More examples coming soon!