diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2022-07-15 05:03:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 05:03:58 (GMT) |
commit | dc54193095e8ac8d73489f7ab133e016a5556256 (patch) | |
tree | eef67b2bffb2b1456c3aab4f2f1fea3627c1a4c3 /Doc/howto | |
parent | 08f68975abb5bc6b3205f9442b68d97f4ef044db (diff) | |
download | cpython-dc54193095e8ac8d73489f7ab133e016a5556256.zip cpython-dc54193095e8ac8d73489f7ab133e016a5556256.tar.gz cpython-dc54193095e8ac8d73489f7ab133e016a5556256.tar.bz2 |
[doc] Update cookbook example and add information about queue types. (GH-94854)
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/logging-cookbook.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 7f4fe3a..321c4bc 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -219,7 +219,7 @@ messages should not. Here's how you can achieve this:: logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M', - filename='/temp/myapp.log', + filename='/tmp/myapp.log', filemode='w') # define a Handler which writes INFO messages or higher to the sys.stderr console = logging.StreamHandler() @@ -270,6 +270,11 @@ are sent to both destinations. This example uses console and file handlers, but you can use any number and combination of handlers you choose. +Note that the above choice of log filename ``/tmp/myapp.log`` implies use of a +standard location for temporary files on POSIX systems. On Windows, you may need to +choose a different directory name for the log - just ensure that the directory exists +and that you have the permissions to create and update files in it. + Configuration server example ---------------------------- |