haskell-webapps icon indicating copy to clipboard operation
haskell-webapps copied to clipboard

Discussion: do we need logging at the domain API layer?

Open saurabhnanda opened this issue 8 years ago • 1 comments

saurabhnanda avatar Oct 15 '16 04:10 saurabhnanda

the handlers run in IO. i'm pretty sure logging is just a fancier form of lift.lift.putStrLn there are some questions to answer about how to pass the file handle around, to ensure everything can log to the same file. also perhaps log rotation.

In a production system sometimes logging is necessary. For example, access logs for advertising tracking. In general, if the logs should be automatically be processed for reporting, or whatever they're needed for.

If there's something you specifically need tracked, can't that just be put in the database directly?

I understand putStrLn debugging, I don't think it's a good idea to leave those print statements in production, because it'll fill up disks with not much use.

I see the value in it, if others have strong feelings about it, but i vote no.

jfoutz avatar Oct 15 '16 07:10 jfoutz