24 lines
749 B
C#
24 lines
749 B
C#
using EonaCat.LogStack.Core;
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace EonaCat.LogStack.Boosters
|
|
{
|
|
// 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.
|
|
|
|
public sealed class UserBooster : BoosterBase
|
|
{
|
|
private static readonly string UserName = Environment.UserName;
|
|
|
|
public UserBooster() : base("User") { }
|
|
|
|
[System.Runtime.CompilerServices.MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public override bool Boost(ref LogEventBuilder builder)
|
|
{
|
|
builder.WithProperty("User", UserName);
|
|
return true;
|
|
}
|
|
}
|
|
}
|