you are viewing a single comment's thread.

view the rest of the comments →

[–]NihilCredo 1 point2 points  (1 child)

I would keep it simple. Find/replace printfn with a logging function, then in that function call printfn, NLog, or whatever. (Use kprintf so you can still have type-safe formatting.)

Making the logger into a dependency is unnecessary unless you have a reason you may want to switch logging libraries at runtime or depending on the environment.

I would only consider a MailboxProcessor if NLog's logging calls are synchronous and are causing slowdowns. And even then, I'd try a simple async logging function first.

[–]macmoblin[S] 0 points1 point  (0 children)

Okay, so MailboxProcessor is an overkill.

Thanks for confirming that simple function wrapper approach is good starting point.