Logary is a high performance, multi-target logging, metric and health-check library for mono and .Net. Targets include: textwriter, console, debugger, nlog, zipkin, nimrod, riemann, logstash, sqlite, sql server, graphite, loggr, elmah.io, logentries. Adapters for: suave.
haf on master
Add System.Data.Odbc to depende… (compare)
haf on master
Correcting copy target in Docke… (compare)
haf on master
Remove stray extra find stanza … (compare)
haf on master
Let Dockerfile copy the artifac… (compare)
haf on master
Quicker builds with pre-downloa… Dockerfile with Rutta publish s… (compare)
haf on master
Test with better .dockerignore … (compare)
haf on master
Makefile targets (compare)
haf on master
Remove legacy/ folder; noone ha… Remove stray duplicate Version … Remove extra print of locales and 5 more (compare)
haf on master
Fix LC_ALL warning from perl (compare)
haf on master
Working Dockerfile build and ma… (compare)
haf on master
Add RELEASE_NOTES note and Dock… (compare)
let logger = Logging.getCurrentLogger ()
Message.event Info "Something here" |> Logger.logSimple logger
threw an exception. ---> System.MissingMethodException: Method not found: 'NodaTime.Instant NodaTime.SystemClock.get_Now()'.
at Logary.MessageModule.Event(LogLevel level, String template)
NodaTime
to my paket
dependencies but that didn't work. Is there something obvious that i am missing?
x.counter.InstanceName <- instance
to change instance, this will initial the instance and the first NextValue
is always zero.
So I've noticed there's been a new release of hopac (yay), but logary stable hasn't been updated in a while (okay).
Unfortunately the latest published hopac and logary don't play nice.
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Program' threw an exception. ---> System.TypeInitializationException: The type initializer for '<StartupCode$Epsilon>.$Program' threw an exception. ---> System.MethodAccessException: Attempt by method 'Logary.Supervisor.create(Logary.Logger)' to access method 'Hopac.Job+Global.startIgnore<Microsoft.FSharp.Core.Unit>(Hopac.Job`1<Microsoft.FSharp.Core.Unit>)' failed.
at Logary.Supervisor.create(Logger logger)
at Logary.Registry.Advanced.create(LogaryConf conf)
at Logary.Configuration.Config.RunLogary(LogaryConf conf)
at Logary.Configuration.Config.WithLogary(String serviceName, FSharpFunc`2 fConf)
at <StartupCode$Epsilon>.$Program..cctor()
--- End of inner exception stack trace ---
at Program..cctor()
--- End of inner exception stack trace ---
at Program.main(String[] _arg1)
bug?
Just playing around with the docs to further consolidate Logary in my head, here's the code-snippet
[<EntryPoint>]
let main argv =
use logary =
withLogaryManager "logary test" (
withTargets [
Console.create Console.empty "console";
InfluxDb.create influxConf "influxdb";
]
>> withRules [
Rule.createForTarget ("influxdb");
Rule.createForTarget ("console");
]
) |> Hopac.Hopac.run
let logger = Logging.getCurrentLogger()
let lFun = fun infoEvent -> Logger.log logger LogLevel.Info (fun _ -> Message.eventInfo infoEvent)
let l =
job {
do! lFun "Logary is weird 1"
do! timeOutMillis 10 // need a small delay, or it doesn't work
do! lFun "Logary is weird 2"
}
Stream.indefinitely (l <*> (timeOutMillis 5000 )) |> Stream.consume
If you log two things in quick succession to the influx target, you lose 'one' of them