How do I do logging in Haskell?

后端 未结 3 453
后悔当初
后悔当初 2021-01-30 16:12

I\'m attempting to use HSlogger to get some information about my program. So I add the following line to my function

import Data.Word
import qualified Data.Byte         


        
3条回答
  •  自闭症患者
    2021-01-30 17:03

    Shameless plug: I'm the author of the co-log logging library. You can find the code of the library and tutorials on GitHub:

    • kowainik/co-log

    The details of the library usage and implementation are described in the following blog post:

    • co-log: Composable Contravariant Combinatorial Comonadic Configurable Convenient Logging

    Don't be afraid of a scary name, the library is actually much simpler than it sounds :) The main idea behind co-log is to treat logging actions as simple Haskell functions. Since functions are first-class citizens in Haskell and it is extremely easy to work with them.

提交回复
热议问题