Upgrade the logger component
[master-thesis.git] / Parasitemia / Logger / Interfaces.fs
diff --git a/Parasitemia/Logger/Interfaces.fs b/Parasitemia/Logger/Interfaces.fs
new file mode 100644 (file)
index 0000000..668ae54
--- /dev/null
@@ -0,0 +1,23 @@
+namespace Logger
+
+open System
+
+open Logger.Types
+
+/// <summary>
+/// Interface for log listeners
+/// </summary>
+type IListener =
+    abstract NewEntry : severity : Severity -> header : string -> message : string -> unit
+
+type internal IWriter =
+    inherit IDisposable
+
+    abstract DebugLoggingEnabled : bool with get, set
+    abstract AvoidRepeatingIdenticalMessages : bool with get, set
+    abstract LogDir : string
+    abstract MaxSizeFile : int64 with get, set
+    abstract LogFiles : string seq
+    abstract Write : message:Message -> unit
+    abstract Flush : unit -> unit
+    abstract ClearLogFilesOlderThan : TimeSpan -> unit
\ No newline at end of file