using System; using System.IO; using System.Globalization; namespace PageBox { /// ///

Write log entries on log.html.
/// Used by audit.aspx.

///

Copyright (c) 2002 Alexis Grandemange
/// Mail: alexis.grandemange@pagebox.net

///
This program is free software; you can redistribute it and/or
	/// modify it under the terms of the GNU Lesser General Public
	/// License as published by the Free Software Foundation; version
	/// 2.1 of the License.
	/// This library 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 Lesser General Public License for more details.
	/// A copy of the GNU Lesser General Public License lesser.txt should be
	/// included in the distribution.
///
public class Log { /// /// Write a log line. /// /// log for an action of this user /// host which triggered the action /// command public static void write(string user, string host, string cmd) { lock(typeof(Log)) { DateTime dt = DateTime.Now; StreamWriter sw = File.AppendText(Global.path + "\\log.html"); sw.WriteLine("" + dt.ToString("u", DateTimeFormatInfo.InvariantInfo) + "" + host + "" + user + "" + cmd + ""); sw.Close(); } } } }