mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-10-11 14:55:00 +00:00
Reload configuration & bugfixes
This commit is contained in:
@@ -30,9 +30,36 @@ namespace Ntp.Analyzer.Log
|
||||
{
|
||||
public static class LogFactory
|
||||
{
|
||||
private static List<LogBase> logs = new List<LogBase>();
|
||||
|
||||
public static void RefreshLogs()
|
||||
{
|
||||
foreach (LogBase log in logs)
|
||||
log.Refresh ();
|
||||
}
|
||||
|
||||
public static void Cleanup()
|
||||
{
|
||||
foreach (LogBase log in logs)
|
||||
log.Close ();
|
||||
|
||||
logs.Clear ();
|
||||
}
|
||||
|
||||
public static ActivityLog CreateActivityLog()
|
||||
{
|
||||
return new ActivityLog ();
|
||||
}
|
||||
|
||||
public static LogGroup CreateGroupLog()
|
||||
{
|
||||
return new LogGroup ();
|
||||
}
|
||||
|
||||
public static LogBase CreateLog(LogConfiguration config)
|
||||
{
|
||||
TextLog log = new TextLog(config.File, config.Treshold);
|
||||
logs.Add (log);
|
||||
return log;
|
||||
}
|
||||
|
||||
@@ -46,6 +73,8 @@ namespace Ntp.Analyzer.Log
|
||||
group.Add(log);
|
||||
}
|
||||
|
||||
logs.Add (group);
|
||||
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user