Save imported image in the same format (WIP)
[master-thesis.git] / Parasitemia / Logger / Readme.md
1 # Logger
2
3 Logger is a small component to log various messages to disk.
4
5
6 ## Features
7
8 * Split log file after a certain size (50 MB) and zip old files.
9 * Multi level logging: debug, info, warning, error, fatal
10 * Log these informations:
11   * Date + time
12   * Level
13   * Caller assembly
14   * Thread name and its number
15   * Message
16
17 ## Usage
18
19 Samples to log to a directory located in the user space:
20
21 ### F#
22
23 ~~~F#
24 let userApplicationDirectory = System.IO.Path.Combine (System.Environment.GetFolderPath System.Environment.SpecialFolder.ApplicationData, "My Application")
25 Log.LogDirectory <- System.IO.Path.Combine (userApplicationDirectory, "Log")
26
27 let v = 42
28 Log.Info "V equals %i" 42
29 ~~~
30
31 ### C#
32
33 ~~~C#
34 var userApplicationDirectory = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), "My Application");
35 Log.LogDirectory = System.IO.Path.Combine(userApplicationDirectory, "Log");
36
37 var v = 42;
38 Log.INFO("V equals {0}", 42);
39 ~~~
40
41
42