Log.Logger <-
LoggerConfiguration()
// Suave.SerilogExtensions has native destructuring mechanism
// this helps Serilog deserialize the fsharp types like unions/records
.Destructure.FSharpTypes()
// use package Serilog.Sinks.Console
// https://github.com/serilog/serilog-sinks-console
.WriteTo.Console()
// add more sinks etc.
.CreateLogger()
gets rewritten as:
Log.Logger <- LoggerConfiguration().// Suave.SerilogExtensions has native destructuring mechanism
// this helps Serilog deserialize the fsharp types like unions/records
Destructure.FSharpTypes().// use package Serilog.Sinks.Console
// https://github.com/serilog/serilog-sinks-console
WriteTo.Console().// add more sinks etc.
CreateLogger()
which is actually invalid F# and does not build.
Using standard fantomas settings with 120 char line length.
In fact, fluent APIs in general don't get very well formatted e.g.:
This code (taken from the
Program.fs
file in the Server project of https://github.com/Zaid-Ajaj/tabula-rasa)gets rewritten as:
which is actually invalid F# and does not build.
Using standard fantomas settings with 120 char line length.
In fact, fluent APIs in general don't get very well formatted e.g.:
becomes
Although this is more aesthetic.