Update the Logger component.
[master-thesis.git] / Parasitemia / ParasitemiaCore / Analysis.fs
index afcf4df..f607760 100644 (file)
@@ -40,8 +40,8 @@ let doAnalysis (img : Image<Bgr, byte>) (name : string) (config : Config) (repor
         reportWithVal percent ()
 
     let inline buildLogWithName (text : string) = sprintf "№ %s: %s" name text
-    let logWithName mess = Log.User(buildLogWithName mess)
-    let inline logTimeWithName (text : string) (f : unit -> 'a option) : 'a option = Log.LogWithTime((buildLogWithName text), Severity.USER, f)
+    let logWithName mess = Log.Info "%s" (buildLogWithName mess)
+    let inline logTimeWithName (text : string) (f : unit -> 'a option) : 'a option = Log.LogWithTime Severity.INFO f "%s" (buildLogWithName text)
 
     // Monadic construction to be able to abort the progress when running.
     maybe {
@@ -186,7 +186,7 @@ let doMultipleAnalysis (imgs : (string * Config * Image<Bgr, byte>) list) (repor
                     | None -> None
                 with
                 | ex ->
-                    Log.Error("Analysis {0} failed: {1}", id, ex)
+                    Log.Error "Analysis %s failed: %O" id ex
                     None
         )
         |> PSeq.withDegreeOfParallelism n