using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.PMR.Diagnostics; namespace Tango.MachineStudio.Common.EventLogging { /// /// Represents a database events logger. /// public interface IEventLogger { /// /// Occurs when a new machine event has been logged. /// event EventHandler NewLog; /// /// Gets or sets a value indicating whether to save the incoming events to database. /// bool SaveToDB { get; set; } /// /// Logs the specified machine event. /// /// The machine event. void Log(MachinesEvent machineEvent); /// /// Logs the specified event type. /// /// Type of the event. /// The message. void Log(EventTypes eventType, String message, bool write_to_db = true); /// /// Logs the specified hardware event. /// /// The hardware event. void Log(Event hardwareEvent); /// /// Logs the specified exception using the . /// /// The exception. void Log(Exception exception); /// /// Logs the specified exception using the . /// /// The exception. void Log(Exception exception, String description); /// /// Logs the specified message using the . /// /// The message. void Log(String message); /// /// Immediately saves all pending events to database. /// void FlushAll(); } }