Files
charger/charger-gui/Logger.cs
T

25 lines
406 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace charger_gui
{
class Logger
{
private string fileName;
public Logger(string fileName)
{
this.fileName = fileName;
}
public void Log(string s)
{
var toLog = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s + "\n";
File.AppendAllText(fileName, toLog);
}
}
}