2017-02-27 02:04:13 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Plane.Logging
|
|
|
|
|
{
|
|
|
|
|
public interface ILogger
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Write a new log entry about the specified exception with the specified priority.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ex">Exception instance to log.</param>
|
|
|
|
|
/// <param name="priority">The priority of the entry.</param>
|
|
|
|
|
void Log(Exception ex, Priority priority = Priority.High);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Write a new log entry with the specified category and priority.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="message">Message body to log.</param>
|
|
|
|
|
/// <param name="category">Category of the entry.</param>
|
|
|
|
|
/// <param name="priority">The priority of the entry.</param>
|
|
|
|
|
void Log(string message, Category category = Category.Info, Priority priority = Priority.None);
|
2018-08-03 11:43:10 +08:00
|
|
|
|
|
|
|
|
|
string ReadLog();
|
2017-02-27 02:04:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|