X2Cscope / pyx2cscope

python implementation of x2cscope
Other
1 stars 0 forks source link

logging #4

Closed tronicbaumi closed 2 months ago

tronicbaumi commented 1 year ago

is there a way to set the logging from the command line if possible also add the possibility to log to a file

edras commented 2 months ago

this issue is addressed at #22

Now pyx2cscope has argparse, one of the arguments is the log-level, its default value is ERROR, but it could be changed at program start, a screenshot of argparse help:

 -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Configure the logging level, INFO is the default value.

to set a different log level, i.e., DEBUG, use following command:

python -m pyx2cscope --log-level DEBUG

the log will be included into file: pyx2cscope.xc2scope.log