FSharp.Logf
FSharp.Logf copied to clipboard
Make Fable ILogger implementations able to receive structured parameters
Currently, the Fable implementation of the library is really a compatibility stub. It just erases parameters from the format string, uses the regular ksprintf function to render the whole thing to a string, then passes that into the logger with no parameters. This works fine for users who seek only to achieve client-server code shareability (i.e. me), but would not be enough for users who want to use fully capable client-side loggers. I'm skeptical that anyone at all wants the latter, so I'm assuming low priority. Feel free to respond here if you actually do want this use case.
The reason it's implemented this way (see logf.fs) is because BlackFox.MasterOfFoo uses reflection that doesn't work under Fable. It should be possible in theory though, as Fable itself provides a Javascript-compatible printf implementation (with a heavy emphasis on in theory).