Last active
December 19, 2015 10:42
-
-
Save Thorium/ca7a9e8a6c6f3cbe8778 to your computer and use it in GitHub Desktop.
Simple example for Logary docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
open Logary | |
open Logary.Configuration | |
open Logary.Targets | |
open Logary.Metrics | |
#if INTERACTIVE | |
#else | |
[<EntryPoint>] | |
#endif | |
let main args = | |
let logary = | |
withLogary "MyProject" ( | |
withTargets [ | |
Logary.Targets.TextWriter.create | |
(TextWriter.TextWriterConf.Create( | |
File.AppendText "happy.log", | |
File.AppendText "sad.log")) "filelogger" | |
] >> withRules [ | |
Rule.createForTarget "filelogger" | |
] | |
) | |
let logger = Logging.getCurrentLogger () | |
LogLine.info "Hello World!" |> logger.Log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment