- 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
28 lines
631 B
C#
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
|
|
}
|