User Tools

Site Tools


other:python:misc_by_jyp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
other:python:misc_by_jyp [2024/08/27 12:47]
jypeter [String formatting] Improved the section
other:python:misc_by_jyp [2024/09/17 14:33] (current)
jypeter Added the Logging section
Line 31: Line 31:
  
  
 +===== Using log files (aka logging) =====
 +
 +It is always possible to display information messages using the ''​print()''​ command, but it is more efficient to use //logging// tools when you want to **display correctly a lot of information about a script progress
 +**
 +  * [[https://​loguru.readthedocs.io/​|Loguru]] is a library which aims to bring enjoyable logging in Python
 +    * See also [[https://​betterstack.com/​community/​guides/​logging/​loguru/​|A Complete Guide to Logging in Python with Loguru]]
 +  * More on [[https://​betterstack.com/​community/​guides/​logging/#​python|logging with python]]
 +  * The default (but not easy to use) Python ''​[[https://​docs.python.org/​3/​library/​logging.html|logging]]''​ module
 ===== Stopping a script ===== ===== Stopping a script =====
  
other/python/misc_by_jyp.txt · Last modified: 2024/09/17 14:33 by jypeter