我正在使用hs.logger,默认行为是默认情况下仅显示警告级别。我想在本地开发时将其设置为DEBUG或INFO ...我发现此功能{{1 }}上的文档(http://www.hammerspoon.org/docs/hs.logger.html#defaultLogLevel),但我在库中找不到此功能!如果您认为在haskell中可以使用更好的库,请也对我说:-)
答案 0 :(得分:0)
我没有使用hslogger的经验,但是来自docs的这一部分似乎很相关:
-- Now we'd like to see everything from BuggyComponent
-- at DEBUG or higher go to syslog and stderr.
-- Also, we'd like to still ignore things less than
-- WARNING in other areas.
--
-- So, we adjust the Logger for MyApp.BuggyComponent.
updateGlobalLogger "MyApp.BuggyComponent"
(setLevel DEBUG)
-- This message will go to syslog and stderr
debugM "MyApp.BuggyComponent" "This buggy component is buggy"