Files
Encelado/TradingBot/Models/LogEntry.cs
Alberto Balbo 92c8e57a8c Persistenza dati e logging avanzato con UI e Unraid
- Aggiunto TradeHistoryService per persistenza trade/posizioni attive su disco (JSON, auto-save/restore)
- Logging centralizzato (LoggingService) con livelli, categorie, simbolo e buffer circolare (500 log)
- Nuova pagina Logs: monitoraggio real-time, filtri avanzati, cancellazione log, colorazione livelli
- Sezione "Dati Persistenti" in Settings: conteggio trade, dimensione dati, reset con conferma modale
- Background service per salvataggio sicuro su shutdown/stop container
- Aggiornata sidebar, stili modali/bottoni danger, .gitignore e documentazione (README, CHANGELOG, UNRAID_INSTALL, checklist)
- Versione 1.3.0
2025-12-22 11:24:17 +01:00

28 lines
631 B
C#

namespace TradingBot.Models;
/// <summary>
/// Represents a log entry with timestamp, severity and message
/// </summary>
public class LogEntry
{
public Guid Id { get; set; } = Guid.NewGuid();
public DateTime Timestamp { get; set; } = DateTime.UtcNow;
public LogLevel Level { get; set; }
public string Category { get; set; } = string.Empty;
public string Message { get; set; } = string.Empty;
public string? Details { get; set; }
public string? Symbol { get; set; }
}
/// <summary>
/// Log severity levels
/// </summary>
public enum LogLevel
{
Debug,
Info,
Warning,
Error,
Trade
}