Solid-Energy-Systems / NewareNDA

Python module and command line tool for reading and converting Neware nda and ndax battery cycling data files.
BSD 3-Clause "New" or "Revised" License
15 stars 8 forks source link

New log_level keyword not printing info #82

Closed d-cogswell closed 1 week ago

d-cogswell commented 1 month ago

It's set to 'INFO' by default, but I'm not seeing the information printed to the terminal.

AdamOpps commented 1 month ago

Hi Dan, By default, a log_level of 'INFO' Will not print to the terminal. The log_level determines which levels (& above, in severity) will be saved to the log file by the logger. Only the 'WARNING', 'ERROR', and 'CRITICAL' levels will print to the terminal. I will look into a way to adjust this with something like a 'print_level'.

d-cogswell commented 1 month ago
  1. Oh I see now. I can have the logging information printed to the terminal by calling logging.basicConfig() or save it to a file with logging.basicConfig(filename='info.log').
AdamOpps commented 1 month ago

Yes, that's it! I was running some tests yesterday and was getting confused about how it works, haha.

It seems to me that saving to a log file then removes ALL terminal printing, even for severe log events. Maybe there is a setting that alters this behavior, such as creating a custom handler? Perhaps this reason is why calling a warnings.warn() with logger.warning() isn't so redundant after all...

d-cogswell commented 1 week ago

I updated the README.