Upgrade the logger component
[master-thesis.git] / Parasitemia / Logger / Types.fs
1 namespace Logger.Types
2
3 open System
4
5 type Severity = DEBUG = 1 | INFO = 2 | WARNING = 3 | ERROR = 4 | FATAL = 5
6
7 type internal Message =
8 {
9 Message : string
10 ThreadName : string
11 ThreadId : int
12 ModuleCaller : string
13 Severity : Severity
14 DateTime : DateTime
15 }
16
17 type internal Command =
18 | Write of Message
19 | Shutdown of AsyncReplyChannel<unit>
20 | Flush of AsyncReplyChannel<unit>
21 | ClearLogFilesOlderThan of TimeSpan
22 | SetAvoidRepeatingIdenticalMessage of bool
23
24 exception NoLogDirectoryDefinedException