Hi, On Tue, Feb 04, 2020 at 03:03:26PM +0000, Jim Easterbrook wrote: > I'd like to map the GPLogLevel enum to Python's logging system. The > GPLogLevel values are documented as: > > GP_LOG_ERROR Log message is an error information. > GP_LOG_VERBOSE Log message is a verbose debug information. > GP_LOG_DEBUG Log message is a debug information. > GP_LOG_DATA Log message is a data hex dump.
This is the incremental order, top down is getting more debug information printed. > This looks odd to me, as from the text I would expect GP_LOG_VERBOSE to be > less severe than GP_LOG_DEBUG, but numerically it's between GP_LOG_DEBUG and > GP_LOG_ERROR. > > Python's logging levels are documented as: > > DEBUG Detailed information, typically of interest only when diagnosing > problems. > INFO Confirmation that things are working as expected. > WARNING An indication that something unexpected happened, or indicative > of > some problem in the near future (e.g. ‘disk space low’). The software is > still working as expected. > ERROR Due to a more serious problem, the software has not been able to > perform some function. > CRITICAL A serious error, indicating that the program itself may be > unable > to continue running. > > These have numeric values 10 apart, so intermediate levels are possible. > > I currently map GPLogLevel as follows: > > GP_LOG_ERROR : WARNING # 30 > GP_LOG_VERBOSE : INFO # 20 > GP_LOG_DEBUG : DEBUG # 10 > GP_LOG_DATA : DEBUG - 5 # 5 > > Does this seem reasonable? I often see GP_LOG_ERROR messages from software > that appears to be functioning correctly, which is why I haven't mapped it > to Python ERROR. I think this is reasonable. Ciao, Marcus _______________________________________________ Gphoto-devel mailing list Gphoto-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gphoto-devel