如何将日志记录设置为调试级别

时间:2018-06-15 11:11:33

标签: r logging

默认情况下,程序包logging仅处理级别INFO的消息。现在我也要记录DEBUG消息。从tutorial我改编了以下代码段:

library(logging)    
logReset()
addHandler(writeToConsole)
setLevel("DEBUG", getHandler("writeToConsole"))
getHandler("writeToConsole")[["level"]]==loglevels["DEBUG"]
#TRUE
loginfo("this is an info")
#2018-06-15 13:04:40 INFO::this is an info
logdebug("this is a debug note.")
# nothing happens

我做错了什么?

0 个答案:

没有答案