mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Implement Linux locator
This commit is contained in:
22
examples/AvaloniaCrossPlat/ConsoleLogger.cs
Normal file
22
examples/AvaloniaCrossPlat/ConsoleLogger.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace AvaloniaCrossPlat;
|
||||
|
||||
public class ConsoleLogger : ILogger
|
||||
{
|
||||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
|
||||
{
|
||||
Console.WriteLine(formatter(state, exception));
|
||||
}
|
||||
|
||||
public bool IsEnabled(LogLevel logLevel)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public IDisposable BeginScope<TState>(TState state)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class Program
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
VelopackApp.Build()
|
||||
.Run();
|
||||
.Run(new ConsoleLogger());
|
||||
|
||||
BuildAvaloniaApp()
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
|
||||
Reference in New Issue
Block a user