NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Common.Log.LogGroup Class Reference
Inheritance diagram for Ntp.Common.Log.LogGroup:
Collaboration diagram for Ntp.Common.Log.LogGroup:

Public Member Functions

void Add (LogBase log)
 
override void Close ()
 
IEnumerator< LogBaseGetEnumerator ()
 
override void Initialize ()
 
override void Resume ()
 
override void Suspend ()
 
override void WriteLine (string text, Severity severity)
 
override void WriteLine (Exception exception)
 
override void WriteLine (Exception exception, Severity severity)
 

Package Functions

 LogGroup ()
 

Properties

LogBase ConsoleLog [get]
 
LogBase SysLog [get]
 
- Properties inherited from Ntp.Common.Log.LogBase
bool IsSysLog [get]
 
Severity Threshold [get]
 

Private Member Functions

IEnumerator IEnumerable. GetEnumerator ()
 

Private Attributes

readonly List< LogBaselogs
 

Additional Inherited Members

- Protected Member Functions inherited from Ntp.Common.Log.LogBase
 LogBase (Severity threshold, bool isSysLog=false)
 

Detailed Description

Definition at line 29 of file LogGroup.cs.

Constructor & Destructor Documentation

Ntp.Common.Log.LogGroup.LogGroup ( )
inlinepackage

Definition at line 31 of file LogGroup.cs.

References Ntp.Common.Log.Trace.

32  : base(Severity.Trace)
33  {
34  logs = new List<LogBase>();
35  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37

Member Function Documentation

void Ntp.Common.Log.LogGroup.Add ( LogBase  log)
inline

Definition at line 71 of file LogGroup.cs.

References Ntp.Common.Log.LogGroup.Add().

Referenced by Ntp.Common.Log.LogGroup.Add(), Ntp.Analyzer.Cli.Program.Main(), and Ntp.Common.Process.Scheduler.Scheduler().

72  {
73  var logGroup = log as LogGroup;
74  if (logGroup != null)
75  {
76  logs.AddRange(logGroup);
77  }
78  else
79  {
80  logs.Add(log);
81  }
82  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37

Here is the call graph for this function:

Here is the caller graph for this function:

override void Ntp.Common.Log.LogGroup.Close ( )
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 84 of file LogGroup.cs.

85  {
86  foreach (var log in logs)
87  log.Close();
88  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37
IEnumerator<LogBase> Ntp.Common.Log.LogGroup.GetEnumerator ( )
inline

Definition at line 61 of file LogGroup.cs.

62  {
63  return logs.GetEnumerator();
64  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37
IEnumerator IEnumerable. Ntp.Common.Log.LogGroup.GetEnumerator ( )
inlineprivate

Definition at line 66 of file LogGroup.cs.

67  {
68  return GetEnumerator();
69  }
IEnumerator< LogBase > GetEnumerator()
Definition: LogGroup.cs:61
override void Ntp.Common.Log.LogGroup.Initialize ( )
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 90 of file LogGroup.cs.

91  {
92  foreach (var log in logs)
93  log.Initialize();
94  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37
override void Ntp.Common.Log.LogGroup.Resume ( )
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 96 of file LogGroup.cs.

97  {
98  foreach (var log in logs)
99  log.Resume();
100  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37
override void Ntp.Common.Log.LogGroup.Suspend ( )
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 102 of file LogGroup.cs.

103  {
104  foreach (var log in logs)
105  log.Suspend();
106  }
readonly List< LogBase > logs
Definition: LogGroup.cs:37
override void Ntp.Common.Log.LogGroup.WriteLine ( string  text,
Severity  severity 
)
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 108 of file LogGroup.cs.

References Ntp.Common.Log.SysLog.WriteLine(), and Ntp.Common.Log.TextLog.WriteLine().

109  {
110  SysLog?.WriteLine(text, severity);
111  ConsoleLog?.WriteLine(text, severity);
112 
113  foreach (var log in logs.Where(l => l is FileLog))
114  log.WriteLine(text, severity);
115  }
abstract void WriteLine(string text, Severity severity)
readonly List< LogBase > logs
Definition: LogGroup.cs:37

Here is the call graph for this function:

override void Ntp.Common.Log.LogGroup.WriteLine ( Exception  exception)
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 117 of file LogGroup.cs.

References Ntp.Common.Log.SysLog.WriteLine(), and Ntp.Common.Log.TextLog.WriteLine().

118  {
119  SysLog?.WriteLine(exception);
120  ConsoleLog?.WriteLine(exception);
121 
122  foreach (var log in logs.Where(l => l is FileLog))
123  log.WriteLine(exception);
124  }
abstract void WriteLine(string text, Severity severity)
readonly List< LogBase > logs
Definition: LogGroup.cs:37

Here is the call graph for this function:

override void Ntp.Common.Log.LogGroup.WriteLine ( Exception  exception,
Severity  severity 
)
inlinevirtual

Implements Ntp.Common.Log.LogBase.

Definition at line 126 of file LogGroup.cs.

References Ntp.Common.Log.SysLog.WriteLine(), and Ntp.Common.Log.TextLog.WriteLine().

127  {
128  SysLog?.WriteLine(exception, severity);
129  ConsoleLog?.WriteLine(exception, severity);
130 
131  foreach (var log in logs.Where(l => l is FileLog))
132  log.WriteLine(exception, severity);
133  }
abstract void WriteLine(string text, Severity severity)
readonly List< LogBase > logs
Definition: LogGroup.cs:37

Here is the call graph for this function:

Member Data Documentation

readonly List<LogBase> Ntp.Common.Log.LogGroup.logs
private

Definition at line 37 of file LogGroup.cs.

Property Documentation

LogBase Ntp.Common.Log.LogGroup.ConsoleLog
getprivate

Definition at line 51 of file LogGroup.cs.

LogBase Ntp.Common.Log.LogGroup.SysLog
getprivate

Definition at line 40 of file LogGroup.cs.


The documentation for this class was generated from the following file: