namespace StardewModdingAPI { /// Encapsulates monitoring and logging for a given module. public interface IMonitor { /********* ** Accessors *********/ /// Whether SMAPI is aborting. Mods don't need to worry about this unless they have background tasks. bool IsExiting { get; } /********* ** Methods *********/ /// Log a message for the player or developer. /// The message to log. /// The log severity level. void Log(string message, LogLevel level = LogLevel.Debug); /// Immediately exit the game without saving. This should only be invoked when an irrecoverable fatal error happens that risks save corruption or game-breaking bugs. /// The reason for the shutdown. void ExitGameImmediately(string reason); } }