using System;
using System.Configuration;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Web;
using System.Web.Security;
using System.Text;
using ScrewTurn.Wiki.PluginFramework;
namespace ScrewTurn.Wiki {
///
/// Records and retrieves Log Entries.
///
public static class Log {
///
/// The system username ('SYSTEM').
///
public const string SystemUsername = "SYSTEM";
///
/// Writes an Entry in the Log.
///
/// The Message.
/// The Type of the Entry.
/// The User that generated the Entry.
public static void LogEntry(string message, EntryType type, string user) {
try {
Settings.Provider.LogEntry(message, type, user);
}
catch { }
}
///
/// Reads all the Log Entries (newest to oldest).
///
/// The Entries.
public static List ReadEntries() {
List entries = new List(Settings.Provider.GetLogEntries());
entries.Reverse();
return entries;
}
///
/// Clears the Log.
///
public static void ClearLog() {
Settings.Provider.ClearLog();
}
}
}