qstcompanion v1.0.1
This commit is contained in:
parent
3e10cbbbf2
commit
44c67ab71b
79 changed files with 21148 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
|
||||
namespace QuestionableCompanion.Models;
|
||||
|
||||
[Serializable]
|
||||
public class LogEntry
|
||||
{
|
||||
public DateTime Timestamp { get; set; } = DateTime.Now;
|
||||
|
||||
public LogLevel Level { get; set; }
|
||||
|
||||
public string Message { get; set; } = string.Empty;
|
||||
|
||||
public string FormattedTimestamp => Timestamp.ToString("HH:mm:ss");
|
||||
|
||||
public string FormattedMessage => $"[{FormattedTimestamp}] {GetLevelIcon()} {Message}";
|
||||
|
||||
private string GetLevelIcon()
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
LogLevel.Info => "→",
|
||||
LogLevel.Success => "✓",
|
||||
LogLevel.Warning => "⏳",
|
||||
LogLevel.Error => "✗",
|
||||
LogLevel.Debug => "▶",
|
||||
_ => "•",
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue