简体   繁体   English

R 记录器的调试器级别 - 最好是否等于 Python 的调试器?

[英]Is R logger's debugger level - FINEST equal to Python's DEBUG?

I'm trying to convert an R script to Python by understanding its functionality.我正在尝试通过了解其功能将R脚本转换为Python

They've created a logger in R and set the level for the logger .他们在 R 中创建了一个记录器,并为记录器设置了级别。 What I'm confused about it is the word FINEST as log level.我对此感到困惑的是FINEST一词作为日志级别。 I haven't come across any such level before in any language.我以前在任何语言中都没有遇到过这样的水平。

Is that FINEST level in R equals to Python's DEBUG , which gives all the output? R中的FINEST级别是否等于Python 的DEBUG ,它给出了所有 output?

setLevel(level='FINEST', container=r_logger)

The finest/finer/fine levels of the R logging package don't exist in python. R 记录 package 的最精细/更精细/精细级别在 python 中不存在。 With loglevels you can see the individual levels and their numeric value.使用loglevels ,您可以查看各个级别及其数值。 This tells you that they are supposed to be even below DEBUG .这告诉您它们应该甚至低于DEBUG If you definitely must have them in python it's possible to create custom levels .如果您绝对必须将它们放在 python 中,则可以创建自定义级别

R logging package levels: R 记录 package 级别:

  NOTSET   FINEST    FINER     FINE    DEBUG     INFO  WARNING     WARN 
       0        1        4        7       10       20       30       30 
   ERROR CRITICAL    FATAL 
      40       50       50

Python log levels: Python 日志级别:

{50: 'CRITICAL', 40: 'ERROR', 30: 'WARNING', 20: 'INFO', 10: 'DEBUG', 0: 'NOTSET'}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM