namespace LazyBear.MCP.Services.Logging;

public sealed record LogEntry(
    DateTimeOffset Timestamp,
    LogLevel Level,
    string Category,
    string Message,
    string? Exception = null)
{
    /// <summary>Короткое имя категории (последний сегмент namespace)</summary>
    public string ShortCategory => Category.Contains('.')
        ? Category[(Category.LastIndexOf('.') + 1)..]
        : Category;
}
