pythonrdebugginglogginglog-level

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.

They've created a logger in R and set the level for the logger. What I'm confused about it is the word FINEST as log level. 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?

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

Solution

  • The finest/finer/fine levels of the R logging package don't exist in python. With loglevels you can see the individual levels and their numeric value. This tells you that they are supposed to be even below DEBUG. If you definitely must have them in python it's possible to create custom levels.

    R logging package levels:

      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:

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