FSLogger 2.4.22
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FSLogger --version 2.4.22
NuGet\Install-Package FSLogger -Version 2.4.22
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FSLogger" Version="2.4.22" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FSLogger --version 2.4.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FSLogger, 2.4.22"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FSLogger as a Cake Addin #addin nuget:?package=FSLogger&version=2.4.22 // Install FSLogger as a Cake Tool #tool nuget:?package=FSLogger&version=2.4.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
F#ing Simple Logger
An rich, simple, and efficient purely functional micro logging library for F#.
This isn't frequently updated because it's literally perfect (well, probably, almost).
HOW TO LOG STUFF:
open FSLogger
let log = Logger.ColorConsole
log.I "Uzing da librariez" // log to info
log.W "%d out of %d developers recommend FsLogger" 5 5 // log to warning with format features
Is that it?
Okay fine. The library can do a bunch of stuff.
More examples
Setting a path to log stuff to:
open FSLogger
let log =
Logger.ColorConsole
|> Logger.withPath "MyApp"
module SeriousBusiness =
let doStuff (log: Logger) (aNumber: int) =
// shadow with a better path
let log = log |> Logger.appendPath "doStuff"
if aNumber > 5 then
log.W "Oh no, %d is bigger than 5!" aNumber
// do something important
ignore aNumber
Adding a custom consumer:
let enterpriseConsumer (l:LogEntry) =
match l.Level with
| LogLevel.Warn -> callManagement(l.Message)
| LogLevel.Error -> blameAnotherDeveloper(l.Message)
| LogLevel.Fatal -> submitNewJobApplication()
| _ -> () // ignore the rest
let log =
Logger.Console
|> Logger.addConsumer enterpriseConsumer
I want more examples!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net452 is compatible. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- FSharp.Core (>= 0.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added Xplat way to get a long time string