/* TShock, a server mod for Terraria Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ using System; namespace TShockAPI { [Flags] public enum LogLevel { None = 0, Debug = 1, Info = 2, Warning = 4, Error = 8, Data = 16, All = 31 } /// /// Logging interface /// public interface ILog { /// /// Log name /// string Name { get; } /// /// Checks whether the log level contains the specified flag. /// /// The value to check. bool MayWriteType(LogLevel type); /// /// Writes an informative string to the log and to the console. /// /// The message to be written. void ConsoleInfo(string message); /// /// Writes an informative string to the log and to the console. /// /// The format of the message to be written. /// The format arguments. void ConsoleInfo(string format, params object[] args); /// /// Writes an error message to the log and to the console. /// /// The message to be written. void ConsoleError(string message); /// /// Writes an error message to the log and to the console. /// /// The format of the message to be written. /// The format arguments. void ConsoleError(string format, params object[] args); /// /// Writes a warning to the log. /// /// The message to be written. void Warn(string message); /// /// Writes a warning to the log. /// /// The format of the message to be written. /// The format arguments. void Warn(string format, params object[] args); /// /// Writes an error to the log. /// /// The message to be written. void Error(string message); /// /// Writes an error to the log. /// /// The format of the message to be written. /// The format arguments. void Error(string format, params object[] args); /// /// Writes an informative string to the log. /// /// The message to be written. void Info(string message); /// /// Writes an informative string to the log. /// /// The format of the message to be written. /// The format arguments. void Info(string format, params object[] args); /// /// Writes data to the log. /// /// The message to be written. void Data(string message); /// /// Writes data to the log. /// /// The format of the message to be written. /// The format arguments. void Data(string format, params object[] args); /// /// Writes a message to the log /// /// Message to write /// LogLevel assosciated with the message void Write(string message, LogLevel level); /// /// Dispose the Log /// void Dispose(); } }