26 lines
893 B
C#
26 lines
893 B
C#
using EonaCat.LogStack.Core;
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
|
// See the LICENSE file or go to https://EonaCat.com/License for full license details.
|
|
|
|
namespace EonaCat.LogStack.Boosters
|
|
{
|
|
public sealed class AppBooster : BoosterBase
|
|
{
|
|
private static readonly string AppName = AppDomain.CurrentDomain.FriendlyName;
|
|
private static readonly string AppBase = AppDomain.CurrentDomain.BaseDirectory;
|
|
|
|
public AppBooster() : base("App") { }
|
|
|
|
[System.Runtime.CompilerServices.MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public override bool Boost(ref LogEventBuilder builder)
|
|
{
|
|
builder.WithProperty("App", AppName);
|
|
builder.WithProperty("AppBase", AppBase);
|
|
return true;
|
|
}
|
|
}
|
|
}
|