/* TShock, a server mod for Terraria Copyright (C) 2011-2017 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; using System.Diagnostics; namespace TShockAPI { /// /// Logging interface /// public interface ILog { /// /// Log file name /// string FileName { get; set; } /// /// Checks whether the log level contains the specified flag. /// /// The value to check. bool MayWriteType(TraceLevel 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, TraceLevel level); /// /// Writes a debug string to the log file. Only works if the DEBUG preprocessor conditional is set. /// /// The message to be written. void Debug(string message); /// /// Writes a debug string to the log file. Only works if the DEBUG preprocessor conditional is set. /// /// The format of the message to be written. /// The format arguments. void Debug(string format, params object[] args); /// /// Dispose the Log /// void Dispose(); } }