mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Logger] Have logging automatically start on Logger create
This commit is contained in:
@@ -23,24 +23,6 @@ namespace SabreTools.Helper
|
||||
// Private required variables
|
||||
private string _basepath = "Logs" + Path.DirectorySeparatorChar;
|
||||
|
||||
// Public wrappers
|
||||
public bool ToFile
|
||||
{
|
||||
get { return _tofile; }
|
||||
set
|
||||
{
|
||||
if (!value)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
_tofile = value;
|
||||
if (_tofile)
|
||||
{
|
||||
Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize a Logger object with the given information
|
||||
/// </summary>
|
||||
@@ -55,6 +37,8 @@ namespace SabreTools.Helper
|
||||
{
|
||||
Directory.CreateDirectory(_basepath);
|
||||
}
|
||||
|
||||
Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user