https://www.python.org/doc/
Python 3.x Resources
https://docs.python.org/3/tutorial/index.html
11. Brief Tour of the Standard Library — Part II
11.5. LoggingThe logging module offers a full featured and flexible logging system. At its simplest, log messages are sent to a file or to sys.stderr:
https://docs.python.org/3/library/logging.html#module-logging
Specifies that a FileHandler be created, using the specified filename, rather than a StreamHandler.
If filename is specified, open the file in this mode. Defaults to 'a'. 点这个 mode
open for reading (default)
open for writing, truncating the file first
open for exclusive creation, failing if the file already exists
open for writing, appending to the end of the file if it exists
open for updating (reading and writing)
|