chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
a444723b-054a-426c-9503-daa4cdaeb5df
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,727
supabase-export-v2
826886ee5278d54b
static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, ... }; PyMODINIT_FUNC PyInit_mymodule(void) { PyObject *m = PyModule_Create(&moduledef); if (m == NULL) { return NULL; } #ifdef Py_GIL_DISABLED PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED); #endif return m; }
trusted_official_docs
CPython Docs
static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, ... }; PyMODINIT_FUNC PyInit_mymodule(void) { PyObject *m = PyModule_Create(&moduledef); if (m == NULL) { return NULL; } #ifdef Py_GIL_DISABLED PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED); #endif return m; }
static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, ... }; PyMODINIT_FUNC PyInit_mymodule(void) { PyObject *m = PyModule_Create(&moduledef); if (m == NULL) { return NULL; } #ifdef Py_GIL_DISABLED PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED); #endif return m; }
python, official-docs, cpython, P0
Local_Trusted_Corpus
a89b3e76-28d4-48ba-ba0f-a8c6e9c7cf37
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,799
supabase-export-v2
ed2409fdfd9a691e
the free-threaded build, with the ``t`` suffix, such as ``python3.14t``. * `pypa/cibuildwheel <https://github.com/pypa/cibuildwheel>`_ supports building wheels for the free-threaded build of Python 3.14 and newer. Limited C API and Stable ABI ............................
trusted_official_docs
CPython Docs
the free-threaded build, with the ``t`` suffix, such as ``python3.14t``. * `pypa/cibuildwheel <https://github.com/pypa/cibuildwheel>`_ supports building wheels for the free-threaded build of Python 3.14 and newer. Limited C API and Stable ABI ............................
the free-threaded build, with the ``t`` suffix, such as ``python3.14t``. * `pypa/cibuildwheel <https://github.com/pypa/cibuildwheel>`_ supports building wheels for the free-threaded build of Python 3.14 and newer. Limited C API and Stable ABI ............................
python, official-docs, cpython, P0
Local_Trusted_Corpus
a8a3ce07-25bb-4c3b-92ea-da72fc3a2f9b
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,754
supabase-export-v2
770439f2751404e4
Protecting Internal Extension State =================================== Your extension may have internal state that was previously protected by the GIL. You may need to add locking to protect this state. The approach will depend on your extension, but some common patterns include:
trusted_official_docs
CPython Docs
Protecting Internal Extension State =================================== Your extension may have internal state that was previously protected by the GIL. You may need to add locking to protect this state. The approach will depend on your extension, but some common patterns include:
Protecting Internal Extension State =================================== Your extension may have internal state that was previously protected by the GIL. You may need to add locking to protect this state. The approach will depend on your extension, but some common patterns include:
python, official-docs, cpython, P0
Local_Trusted_Corpus
acf981fe-3c53-4d6f-a1af-b0bc28b51be0
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,766
supabase-export-v2
29984347e5dccbee
new local scope. These macros are no-ops in non-free-threaded builds, so they can be safely added to code that needs to support both build types. A common use of a critical section would be to lock an object while accessing an internal attribute of it. For example, if an extension type has an internal count field, you ...
trusted_official_docs
CPython Docs
new local scope. These macros are no-ops in non-free-threaded builds, so they can be safely added to code that needs to support both build types. A common use of a critical section would be to lock an object while accessing an internal attribute of it. For example, if an extension type has an internal count field, you ...
new local scope. These macros are no-ops in non-free-threaded builds, so they can be safely added to code that needs to support both build types. A common use of a critical section would be to lock an object while accessing an internal attribute of it. For example, if an extension type has an internal count field, you ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b5d2c8d2-a3f4-4d46-8b23-5c9dfcc04f15
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,783
supabase-export-v2
5f1a66ac2ca3125c
locks, allowing other threads to modify the protected data. Be careful about making assumptions about the state of the data after operations that might block. * Because locks can be temporarily released (suspended), entering a critical section does not guarantee exclusive access to the protected resource throughout t...
trusted_official_docs
CPython Docs
locks, allowing other threads to modify the protected data. Be careful about making assumptions about the state of the data after operations that might block. * Because locks can be temporarily released (suspended), entering a critical section does not guarantee exclusive access to the protected resource throughout t...
locks, allowing other threads to modify the protected data. Be careful about making assumptions about the state of the data after operations that might block. * Because locks can be temporarily released (suspended), entering a critical section does not guarantee exclusive access to the protected resource throughout t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ba1e07de-719e-45d3-a6b3-a83379931414
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,734
supabase-export-v2
cdaa6d28a4c36750
``PyDict_Next`` ''''''''''''''' A notable exception is :c:func:`PyDict_Next`, which does not lock the dictionary. You should use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to protect the dictionary while iterating over it if the dictionary may be concurrently modified::
trusted_official_docs
CPython Docs
``PyDict_Next`` ''''''''''''''' A notable exception is :c:func:`PyDict_Next`, which does not lock the dictionary. You should use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to protect the dictionary while iterating over it if the dictionary may be concurrently modified::
``PyDict_Next`` ''''''''''''''' A notable exception is :c:func:`PyDict_Next`, which does not lock the dictionary. You should use :c:macro:`Py_BEGIN_CRITICAL_SECTION` to protect the dictionary while iterating over it if the dictionary may be concurrently modified::
python, official-docs, cpython, P0
Local_Trusted_Corpus
bd20b221-f04e-49e9-84b8-67a925cb7ba0
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,745
supabase-export-v2
023813753f91f573
Memory Allocation APIs ====================== Python's memory management C API provides functions in three different :ref:`allocation domains <allocator-domains>`: "raw", "mem", and "object". For thread-safety, the free-threaded build requires that only Python objects are allocated using the object domain, and that all...
trusted_official_docs
CPython Docs
Memory Allocation APIs ====================== Python's memory management C API provides functions in three different :ref:`allocation domains <allocator-domains>`: "raw", "mem", and "object". For thread-safety, the free-threaded build requires that only Python objects are allocated using the object domain, and that all...
Memory Allocation APIs ====================== Python's memory management C API provides functions in three different :ref:`allocation domains <allocator-domains>`: "raw", "mem", and "object". For thread-safety, the free-threaded build requires that only Python objects are allocated using the object domain, and that all...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c03da27c-e8db-4ec6-9fa4-1d5d3a06a15a
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,784
supabase-export-v2
0c7d82f52dce284e
all locks held by the thread via critical sections will be released. This is similar to how the GIL can be released during blocking calls. * Only the lock(s) associated with the most recently entered (top-most) critical section are guaranteed to be held at any given time. Locks for outer, nested critical sections mig...
trusted_official_docs
CPython Docs
all locks held by the thread via critical sections will be released. This is similar to how the GIL can be released during blocking calls. * Only the lock(s) associated with the most recently entered (top-most) critical section are guaranteed to be held at any given time. Locks for outer, nested critical sections mig...
all locks held by the thread via critical sections will be released. This is similar to how the GIL can be released during blocking calls. * Only the lock(s) associated with the most recently entered (top-most) critical section are guaranteed to be held at any given time. Locks for outer, nested critical sections mig...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ca431004-a1ca-4dd9-a5a6-0d180e4426d8
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,720
supabase-export-v2
c64e35e5f2608a81
Multi-Phase Initialization .......................... Extensions that use :ref:`multi-phase initialization <multi-phase-initialization>` (functions like :c:func:`PyModuleDef_Init`, :c:func:`PyModExport_* <PyModExport_modulename>` export hook, :c:func:`PyModule_FromSlotsAndSpec`) should add a :c:data:`Py_mod_gil` slot i...
trusted_official_docs
CPython Docs
Multi-Phase Initialization .......................... Extensions that use :ref:`multi-phase initialization <multi-phase-initialization>` (functions like :c:func:`PyModuleDef_Init`, :c:func:`PyModExport_* <PyModExport_modulename>` export hook, :c:func:`PyModule_FromSlotsAndSpec`) should add a :c:data:`Py_mod_gil` slot i...
Multi-Phase Initialization .......................... Extensions that use :ref:`multi-phase initialization <multi-phase-initialization>` (functions like :c:func:`PyModuleDef_Init`, :c:func:`PyModExport_* <PyModExport_modulename>` export hook, :c:func:`PyModule_FromSlotsAndSpec`) should add a :c:data:`Py_mod_gil` slot i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ca959fe7-0fef-4138-95d9-27f504ee490a
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,710
supabase-export-v2
cd92b9920218d526
****************************************** C API Extension Support for Free Threading ****************************************** Starting with the 3.13 release, CPython has support for running with the :term:`global interpreter lock` (GIL) disabled in a configuration called :term:`free threading`. This document describ...
trusted_official_docs
CPython Docs
****************************************** C API Extension Support for Free Threading ****************************************** Starting with the 3.13 release, CPython has support for running with the :term:`global interpreter lock` (GIL) disabled in a configuration called :term:`free threading`. This document describ...
****************************************** C API Extension Support for Free Threading ****************************************** Starting with the 3.13 release, CPython has support for running with the :term:`global interpreter lock` (GIL) disabled in a configuration called :term:`free threading`. This document describ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cca6256a-a45a-45e4-bb78-1be102c028ab
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,773
supabase-export-v2
1d9624a139fd6e54
* Critical sections operate on a per-object basis rather than globally * Critical sections follow a stack discipline within each thread (the "begin" and "end" macros enforce this since they must be paired and within the same scope)
trusted_official_docs
CPython Docs
* Critical sections operate on a per-object basis rather than globally * Critical sections follow a stack discipline within each thread (the "begin" and "end" macros enforce this since they must be paired and within the same scope)
* Critical sections operate on a per-object basis rather than globally * Critical sections follow a stack discipline within each thread (the "begin" and "end" macros enforce this since they must be paired and within the same scope)
python, official-docs, cpython, P0
Local_Trusted_Corpus
d8ff36c9-cf85-49a6-bdfd-d3fd7ecc4c32
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,740
supabase-export-v2
f5c50a59fc8660d1
The following table lists some borrowed reference APIs and their replacements that return :term:`strong references <strong reference>`. +-----------------------------------+-----------------------------------+ | Borrowed reference API | Strong reference API | +===================================+=======================...
trusted_official_docs
CPython Docs
The following table lists some borrowed reference APIs and their replacements that return :term:`strong references <strong reference>`. +-----------------------------------+-----------------------------------+ | Borrowed reference API | Strong reference API | +===================================+=======================...
The following table lists some borrowed reference APIs and their replacements that return :term:`strong references <strong reference>`. +-----------------------------------+-----------------------------------+ | Borrowed reference API | Strong reference API | +===================================+=======================...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ddce9d6c-0e07-4c23-8791-e4f9ddbf6081
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,785
supabase-export-v2
ecb0e8e13543b0a7
most recently entered (top-most) critical section are guaranteed to be held at any given time. Locks for outer, nested critical sections might have been suspended. * You can lock at most two objects simultaneously with these APIs. If you need to lock more objects, you'll need to restructure your code.
trusted_official_docs
CPython Docs
most recently entered (top-most) critical section are guaranteed to be held at any given time. Locks for outer, nested critical sections might have been suspended. * You can lock at most two objects simultaneously with these APIs. If you need to lock more objects, you'll need to restructure your code.
most recently entered (top-most) critical section are guaranteed to be held at any given time. Locks for outer, nested critical sections might have been suspended. * You can lock at most two objects simultaneously with these APIs. If you need to lock more objects, you'll need to restructure your code.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e1b35d68-7d35-4f67-839f-852f93779dbd
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,777
supabase-export-v2
a49a7f9abbe5d13c
Critical sections help avoid deadlocks in two ways: 1. If a thread tries to acquire a lock that's already held by another thread, it first suspends all of its active critical sections, temporarily releasing their locks
trusted_official_docs
CPython Docs
Critical sections help avoid deadlocks in two ways: 1. If a thread tries to acquire a lock that's already held by another thread, it first suspends all of its active critical sections, temporarily releasing their locks
Critical sections help avoid deadlocks in two ways: 1. If a thread tries to acquire a lock that's already held by another thread, it first suspends all of its active critical sections, temporarily releasing their locks
python, official-docs, cpython, P0
Local_Trusted_Corpus
e36d848d-3ccc-4f66-8298-6ec5cdb1b50a
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,801
supabase-export-v2
8ddedb57adfcbd9a
build your extension and currently set ``py_limited_api=True`` you can use ``py_limited_api=not sysconfig.get_config_var("Py_GIL_DISABLED")`` to opt out of the limited API when building with the free-threaded build. .. note:: You will need to build separate wheels specifically for the free-threaded build. If you curr...
trusted_official_docs
CPython Docs
build your extension and currently set ``py_limited_api=True`` you can use ``py_limited_api=not sysconfig.get_config_var("Py_GIL_DISABLED")`` to opt out of the limited API when building with the free-threaded build. .. note:: You will need to build separate wheels specifically for the free-threaded build. If you curr...
build your extension and currently set ``py_limited_api=True`` you can use ``py_limited_api=not sysconfig.get_config_var("Py_GIL_DISABLED")`` to opt out of the limited API when building with the free-threaded build. .. note:: You will need to build separate wheels specifically for the free-threaded build. If you curr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e57a2cad-95a8-44fe-b61f-3915c3027b05
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,772
supabase-export-v2
ff035cd7bcbb89d9
This behavior is similar to what happens with the GIL when a thread makes a blocking call. The key differences are: * Critical sections operate on a per-object basis rather than globally
trusted_official_docs
CPython Docs
This behavior is similar to what happens with the GIL when a thread makes a blocking call. The key differences are: * Critical sections operate on a per-object basis rather than globally
This behavior is similar to what happens with the GIL when a thread makes a blocking call. The key differences are: * Critical sections operate on a per-object basis rather than globally
python, official-docs, cpython, P0
Local_Trusted_Corpus
e5bcf025-49fc-4f46-b626-ec578bab187a
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,758
supabase-export-v2
5a4b28ab57daad7c
.. _critical-sections: In the free-threaded build, CPython provides a mechanism called "critical sections" to protect data that would otherwise be protected by the GIL. While extension authors may not interact with the internal critical section implementation directly, understanding their behavior is crucial when using...
trusted_official_docs
CPython Docs
.. _critical-sections: In the free-threaded build, CPython provides a mechanism called "critical sections" to protect data that would otherwise be protected by the GIL. While extension authors may not interact with the internal critical section implementation directly, understanding their behavior is crucial when using...
.. _critical-sections: In the free-threaded build, CPython provides a mechanism called "critical sections" to protect data that would otherwise be protected by the GIL. While extension authors may not interact with the internal critical section implementation directly, understanding their behavior is crucial when using...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e6ab587b-f8b3-4827-a5b9-a57c42cdeb90
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,788
supabase-export-v2
a83677b3abc7861f
the order of the objects doesn't affect correctness (the implementation handles deadlock avoidance), but it's good practice to always lock objects in a consistent order. * Remember that the critical section macros are primarily for protecting access to *Python objects* that might be involved in internal CPython operat...
trusted_official_docs
CPython Docs
the order of the objects doesn't affect correctness (the implementation handles deadlock avoidance), but it's good practice to always lock objects in a consistent order. * Remember that the critical section macros are primarily for protecting access to *Python objects* that might be involved in internal CPython operat...
the order of the objects doesn't affect correctness (the implementation handles deadlock avoidance), but it's good practice to always lock objects in a consistent order. * Remember that the critical section macros are primarily for protecting access to *Python objects* that might be involved in internal CPython operat...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e7a1aa4a-e0ad-4ea6-b8e8-652fd201e374
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,771
supabase-export-v2
ec152ac6b2641216
section (e.g., by acquiring another lock or performing I/O), the critical section is temporarily suspended—all locks are released—and then resumed when the blocking operation completes. This behavior is similar to what happens with the GIL when a thread makes a blocking call. The key differences are:
trusted_official_docs
CPython Docs
section (e.g., by acquiring another lock or performing I/O), the critical section is temporarily suspended—all locks are released—and then resumed when the blocking operation completes. This behavior is similar to what happens with the GIL when a thread makes a blocking call. The key differences are:
section (e.g., by acquiring another lock or performing I/O), the critical section is temporarily suspended—all locks are released—and then resumed when the blocking operation completes. This behavior is similar to what happens with the GIL when a thread makes a blocking call. The key differences are:
python, official-docs, cpython, P0
Local_Trusted_Corpus
fe7e1e69-7453-4e04-aaba-74d04a6d83e9
CPython Docs
file://datasets/cpython/Doc/howto/free-threading-extensions.rst
unknown
3895b142-ba85-4923-b7b4-60bdc2b959f5
58,778
supabase-export-v2
c1f82f54c4359409
thread tries to acquire a lock that's already held by another thread, it first suspends all of its active critical sections, temporarily releasing their locks 2. When the blocking operation completes, only the top-most critical section is reacquired first
trusted_official_docs
CPython Docs
thread tries to acquire a lock that's already held by another thread, it first suspends all of its active critical sections, temporarily releasing their locks 2. When the blocking operation completes, only the top-most critical section is reacquired first
thread tries to acquire a lock that's already held by another thread, it first suspends all of its active critical sections, temporarily releasing their locks 2. When the blocking operation completes, only the top-most critical section is reacquired first
python, official-docs, cpython, P0
Local_Trusted_Corpus
0864644c-0bb7-4ee0-86a0-0923273124e8
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,004
supabase-export-v2
8c6626311aa539d2
encoded as instances of the :class:`~logging.LogRecord` class. When a logger decides to actually log an event, a :class:`~logging.LogRecord` instance is created from the logging message. Logging messages are subjected to a dispatch mechanism through the use of :dfn:`handlers`, which are instances of subclasses of the :...
trusted_official_docs
CPython Docs
encoded as instances of the :class:`~logging.LogRecord` class. When a logger decides to actually log an event, a :class:`~logging.LogRecord` instance is created from the logging message. Logging messages are subjected to a dispatch mechanism through the use of :dfn:`handlers`, which are instances of subclasses of the :...
encoded as instances of the :class:`~logging.LogRecord` class. When a logger decides to actually log an event, a :class:`~logging.LogRecord` instance is created from the logging message. Logging messages are subjected to a dispatch mechanism through the use of :dfn:`handlers`, which are instances of subclasses of the :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
09c0beba-834b-4534-8f33-ff65cab501f9
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,818
supabase-export-v2
7d8c9b1d1a62919e
When to use logging ^^^^^^^^^^^^^^^^^^^ You can access logging functionality by creating a logger via ``logger = logging.getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :meth:`~Logger.critical` methods. To determine whe...
trusted_official_docs
CPython Docs
When to use logging ^^^^^^^^^^^^^^^^^^^ You can access logging functionality by creating a logger via ``logger = logging.getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :meth:`~Logger.critical` methods. To determine whe...
When to use logging ^^^^^^^^^^^^^^^^^^^ You can access logging functionality by creating a logger via ``logger = logging.getLogger(__name__)``, and then calling the logger's :meth:`~Logger.debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, :meth:`~Logger.error` and :meth:`~Logger.critical` methods. To determine whe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0a99949c-bfca-4f55-b6cc-5d39c95e61ff
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,050
supabase-export-v2
f751285ab352b421
precise control over what logging information is collected. Here's a list of things you can do to avoid processing during logging which you don't need: +-----------------------------------------------------+---------------------------------------------------+ | What you don't want to collect | How to avoid collecting i...
trusted_official_docs
CPython Docs
precise control over what logging information is collected. Here's a list of things you can do to avoid processing during logging which you don't need: +-----------------------------------------------------+---------------------------------------------------+ | What you don't want to collect | How to avoid collecting i...
precise control over what logging information is collected. Here's a list of things you can do to avoid processing during logging which you don't need: +-----------------------------------------------------+---------------------------------------------------+ | What you don't want to collect | How to avoid collecting i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0b444f7d-8b7a-4a9a-9f2e-8a73b27f87e5
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,840
supabase-export-v2
bb3290b9307456ea
*errors* argument can also now be passed, which determines how encoding errors are handled. For available values and the default, see the documentation for :func:`open`. And now if we open the file and look at what we have, we should find the log messages:
trusted_official_docs
CPython Docs
*errors* argument can also now be passed, which determines how encoding errors are handled. For available values and the default, see the documentation for :func:`open`. And now if we open the file and look at what we have, we should find the log messages:
*errors* argument can also now be passed, which determines how encoding errors are handled. For available values and the default, see the documentation for :func:`open`. And now if we open the file and look at what we have, we should find the log messages:
python, official-docs, cpython, P0
Local_Trusted_Corpus
0e1ada3c-f1cf-4da9-833c-d029edcd2d01
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,993
supabase-export-v2
4c9daa6cc2fbbd0d
(as described in the previous section) events of severity ``WARNING`` and greater will be printed to ``sys.stderr``. This is regarded as the best default behaviour. If for some reason you *don't* want these messages printed in the absence of any logging configuration, you can attach a do-nothing handler to the top-leve...
trusted_official_docs
CPython Docs
(as described in the previous section) events of severity ``WARNING`` and greater will be printed to ``sys.stderr``. This is regarded as the best default behaviour. If for some reason you *don't* want these messages printed in the absence of any logging configuration, you can attach a do-nothing handler to the top-leve...
(as described in the previous section) events of severity ``WARNING`` and greater will be printed to ``sys.stderr``. This is regarded as the best default behaviour. If for some reason you *don't* want these messages printed in the absence of any logging configuration, you can attach a do-nothing handler to the top-leve...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0eb0c596-2117-4998-ae2d-d67478c5cdec
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,043
supabase-export-v2
5ba7d45b9cbefae1
Using arbitrary objects as messages ----------------------------------- In the preceding sections and examples, it has been assumed that the message passed when logging the event is a string. However, this is not the only possibility. You can pass an arbitrary object as a message, and its :meth:`~object.__str__` method...
trusted_official_docs
CPython Docs
Using arbitrary objects as messages ----------------------------------- In the preceding sections and examples, it has been assumed that the message passed when logging the event is a string. However, this is not the only possibility. You can pass an arbitrary object as a message, and its :meth:`~object.__str__` method...
Using arbitrary objects as messages ----------------------------------- In the preceding sections and examples, it has been assumed that the message passed when logging the event is a string. However, this is not the only possibility. You can pass an arbitrary object as a message, and its :meth:`~object.__str__` method...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f78eb18-a56e-4b39-ac64-737e2a6900c1
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,036
supabase-export-v2
daa9db8e44a12e3d
Exceptions raised during logging -------------------------------- The logging package is designed to swallow exceptions which occur while logging in production. This is so that errors which occur while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the applica...
trusted_official_docs
CPython Docs
Exceptions raised during logging -------------------------------- The logging package is designed to swallow exceptions which occur while logging in production. This is so that errors which occur while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the applica...
Exceptions raised during logging -------------------------------- The logging package is designed to swallow exceptions which occur while logging in production. This is so that errors which occur while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the applica...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f8b649c-b3d5-4d3b-9150-e288cb0b3873
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,896
supabase-export-v2
7e74c9362993d680
severity:logger name:message You can change this by passing a format string to :func:`basicConfig` with the *format* keyword argument. For all options regarding how a format string is constructed, see :ref:`formatter-objects`.
trusted_official_docs
CPython Docs
severity:logger name:message You can change this by passing a format string to :func:`basicConfig` with the *format* keyword argument. For all options regarding how a format string is constructed, see :ref:`formatter-objects`.
severity:logger name:message You can change this by passing a format string to :func:`basicConfig` with the *format* keyword argument. For all options regarding how a format string is constructed, see :ref:`formatter-objects`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
13a57c8e-abd5-43d4-8c20-f8e5127195e9
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,838
supabase-export-v2
a02abba89c4cd4ce
look at that next. Be sure to try the following in a newly started Python interpreter, and don't just continue from the session described above:: import logging logger = logging.getLogger(__name__) logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logger.debug('This message should go...
trusted_official_docs
CPython Docs
look at that next. Be sure to try the following in a newly started Python interpreter, and don't just continue from the session described above:: import logging logger = logging.getLogger(__name__) logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logger.debug('This message should go...
look at that next. Be sure to try the following in a newly started Python interpreter, and don't just continue from the session described above:: import logging logger = logging.getLogger(__name__) logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logger.debug('This message should go...
python, official-docs, cpython, P0
Local_Trusted_Corpus
18a8cdb8-e946-4be4-bda4-cb109770a87d
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,839
supabase-export-v2
832a77fffd74de6f
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logger.debug('This message should go to the log file') logger.info('So should this') logger.warning('And this, too') logger.error('And non-ASCII stuff, too, like Øresund and Malmö') .. versionchanged:: 3.9 The *encoding* argument was ad...
trusted_official_docs
CPython Docs
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logger.debug('This message should go to the log file') logger.info('So should this') logger.warning('And this, too') logger.error('And non-ASCII stuff, too, like Øresund and Malmö') .. versionchanged:: 3.9 The *encoding* argument was ad...
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logger.debug('This message should go to the log file') logger.info('So should this') logger.warning('And this, too') logger.error('And non-ASCII stuff, too, like Øresund and Malmö') .. versionchanged:: 3.9 The *encoding* argument was ad...
python, official-docs, cpython, P0
Local_Trusted_Corpus
18b4f54f-9a51-418c-be1b-87268e7a258e
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,037
supabase-export-v2
3333086d94a427f0
while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the application using logging to terminate prematurely. :class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never swallowed. Other exceptions which occur during the :meth:`~Handler.emit` method...
trusted_official_docs
CPython Docs
while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the application using logging to terminate prematurely. :class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never swallowed. Other exceptions which occur during the :meth:`~Handler.emit` method...
while handling logging events - such as logging misconfiguration, network or other similar errors - do not cause the application using logging to terminate prematurely. :class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never swallowed. Other exceptions which occur during the :meth:`~Handler.emit` method...
python, official-docs, cpython, P0
Local_Trusted_Corpus
191455f4-40f1-46ec-b96e-1c361941a092
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,862
supabase-export-v2
3b8d18f75ecae04b
To change the format which is used to display messages, you need to specify the format you want to use:: import logging logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logging.debug('This message should appear on the console') logging.info('So should this') logging.warning('And this, to...
trusted_official_docs
CPython Docs
To change the format which is used to display messages, you need to specify the format you want to use:: import logging logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logging.debug('This message should appear on the console') logging.info('So should this') logging.warning('And this, to...
To change the format which is used to display messages, you need to specify the format you want to use:: import logging logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logging.debug('This message should appear on the console') logging.info('So should this') logging.warning('And this, to...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1b8f11aa-b62a-43ca-8a92-6909483e22dc
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,873
supabase-export-v2
17b7e399e25559f3
like ISO8601 or :rfc:`3339`. If you need more control over the formatting of the date/time, provide a *datefmt* argument to ``basicConfig``, as in this example:: import logging logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') logging.warning('is when this event was logged.')
trusted_official_docs
CPython Docs
like ISO8601 or :rfc:`3339`. If you need more control over the formatting of the date/time, provide a *datefmt* argument to ``basicConfig``, as in this example:: import logging logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') logging.warning('is when this event was logged.')
like ISO8601 or :rfc:`3339`. If you need more control over the formatting of the date/time, provide a *datefmt* argument to ``basicConfig``, as in this example:: import logging logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') logging.warning('is when this event was logged.')
python, official-docs, cpython, P0
Local_Trusted_Corpus
1d0797bb-7b44-4ed1-940c-74772604ca65
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,879
supabase-export-v2
2c840b3b2a199ded
Next Steps ^^^^^^^^^^ That concludes the basic tutorial. It should be enough to get you up and running with logging. There's a lot more that the logging package offers, but to get the best out of it, you'll need to invest a little more of your time in reading the following sections. If you're ready for that, grab some ...
trusted_official_docs
CPython Docs
Next Steps ^^^^^^^^^^ That concludes the basic tutorial. It should be enough to get you up and running with logging. There's a lot more that the logging package offers, but to get the best out of it, you'll need to invest a little more of your time in reading the following sections. If you're ready for that, grab some ...
Next Steps ^^^^^^^^^^ That concludes the basic tutorial. It should be enough to get you up and running with logging. There's a lot more that the logging package offers, but to get the best out of it, you'll need to invest a little more of your time in reading the following sections. If you're ready for that, grab some ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1da3e0f4-c955-44bf-970b-add77129df19
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,910
supabase-export-v2
cde091f2ab5e0647
These are the most common configuration methods: * :meth:`Logger.setLevel` specifies the lowest-severity log message a logger will handle, where debug is the lowest built-in severity level and critical is the highest built-in severity. For example, if the severity level is INFO, the logger will handle only INFO, WAR...
trusted_official_docs
CPython Docs
These are the most common configuration methods: * :meth:`Logger.setLevel` specifies the lowest-severity log message a logger will handle, where debug is the lowest built-in severity level and critical is the highest built-in severity. For example, if the severity level is INFO, the logger will handle only INFO, WAR...
These are the most common configuration methods: * :meth:`Logger.setLevel` specifies the lowest-severity log message a logger will handle, where debug is the lowest built-in severity level and critical is the highest built-in severity. For example, if the severity level is INFO, the logger will handle only INFO, WAR...
python, official-docs, cpython, P0
Local_Trusted_Corpus
215bb72e-22d2-4167-9f1c-bc28f4df88e9
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,014
supabase-export-v2
680ca38920dbfad2
#. :class:`FileHandler` instances send messages to disk files. #. :class:`~handlers.BaseRotatingHandler` is the base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:`~handlers.TimedRotatingFileHand...
trusted_official_docs
CPython Docs
#. :class:`FileHandler` instances send messages to disk files. #. :class:`~handlers.BaseRotatingHandler` is the base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:`~handlers.TimedRotatingFileHand...
#. :class:`FileHandler` instances send messages to disk files. #. :class:`~handlers.BaseRotatingHandler` is the base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:`~handlers.TimedRotatingFileHand...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2459e66c-481b-4764-8249-7bc045190b3d
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,894
supabase-export-v2
f3597ae9a99bbe46
destination of the console (``sys.stderr``) and a default format for the displayed message before delegating to the root logger to do the actual message output. The default format set by :func:`basicConfig` for messages is:
trusted_official_docs
CPython Docs
destination of the console (``sys.stderr``) and a default format for the displayed message before delegating to the root logger to do the actual message output. The default format set by :func:`basicConfig` for messages is:
destination of the console (``sys.stderr``) and a default format for the displayed message before delegating to the root logger to do the actual message output. The default format set by :func:`basicConfig` for messages is:
python, official-docs, cpython, P0
Local_Trusted_Corpus
2477de27-f3e2-4251-b947-50091dab2b50
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,016
supabase-export-v2
325e3e2cefd2c372
#. :class:`~handlers.RotatingFileHandler` instances send messages to disk files, with support for maximum log file sizes and log file rotation. #. :class:`~handlers.TimedRotatingFileHandler` instances send messages to disk files, rotating the log file at certain timed intervals.
trusted_official_docs
CPython Docs
#. :class:`~handlers.RotatingFileHandler` instances send messages to disk files, with support for maximum log file sizes and log file rotation. #. :class:`~handlers.TimedRotatingFileHandler` instances send messages to disk files, rotating the log file at certain timed intervals.
#. :class:`~handlers.RotatingFileHandler` instances send messages to disk files, with support for maximum log file sizes and log file rotation. #. :class:`~handlers.TimedRotatingFileHandler` instances send messages to disk files, rotating the log file at certain timed intervals.
python, official-docs, cpython, P0
Local_Trusted_Corpus
259c183d-f8f4-4348-a8e3-cd663f216121
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,923
supabase-export-v2
95e3978942e2bd15
an email address. This scenario requires three individual handlers where each handler is responsible for sending messages of a specific severity to a specific location. The standard library includes quite a few handler types (see :ref:`useful-handlers`); the tutorials use mainly :class:`StreamHandler` and :class:`FileH...
trusted_official_docs
CPython Docs
an email address. This scenario requires three individual handlers where each handler is responsible for sending messages of a specific severity to a specific location. The standard library includes quite a few handler types (see :ref:`useful-handlers`); the tutorials use mainly :class:`StreamHandler` and :class:`FileH...
an email address. This scenario requires three individual handlers where each handler is responsible for sending messages of a specific severity to a specific location. The standard library includes quite a few handler types (see :ref:`useful-handlers`); the tutorials use mainly :class:`StreamHandler` and :class:`FileH...
python, official-docs, cpython, P0
Local_Trusted_Corpus
25b6d9ee-273f-4266-a761-55f3c6ca0727
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,919
supabase-export-v2
d6d778a98b12b916
the list. For example, given a logger with a name of ``foo``, loggers with names of ``foo.bar``, ``foo.bar.baz``, and ``foo.bam`` are all descendants of ``foo``. Loggers have a concept of *effective level*. If a level is not explicitly set on a logger, the level of its parent is used instead as its effective level. If ...
trusted_official_docs
CPython Docs
the list. For example, given a logger with a name of ``foo``, loggers with names of ``foo.bar``, ``foo.bar.baz``, and ``foo.bam`` are all descendants of ``foo``. Loggers have a concept of *effective level*. If a level is not explicitly set on a logger, the level of its parent is used instead as its effective level. If ...
the list. For example, given a logger with a name of ``foo``, loggers with names of ``foo.bar``, ``foo.bar.baz``, and ``foo.bam`` are all descendants of ``foo``. Loggers have a concept of *effective level*. If a level is not explicitly set on a logger, the level of its parent is used instead as its effective level. If ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
26e77486-c48c-4691-b1d7-e05153a21240
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,994
supabase-export-v2
16efae635af0a072
will add some handlers, and if levels are suitably configured then logging calls made in library code will send output to those handlers, as normal. A do-nothing handler is included in the logging package: :class:`~logging.NullHandler` (since Python 3.1). An instance of this handler could be added to the top-level logg...
trusted_official_docs
CPython Docs
will add some handlers, and if levels are suitably configured then logging calls made in library code will send output to those handlers, as normal. A do-nothing handler is included in the logging package: :class:`~logging.NullHandler` (since Python 3.1). An instance of this handler could be added to the top-level logg...
will add some handlers, and if levels are suitably configured then logging calls made in library code will send output to those handlers, as normal. A do-nothing handler is included in the logging package: :class:`~logging.NullHandler` (since Python 3.1). An instance of this handler could be added to the top-level logg...
python, official-docs, cpython, P0
Local_Trusted_Corpus
29d27bf7-99e3-4431-8fd0-c8bd967b78a4
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,825
supabase-export-v2
5946534716db7887
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. | +--------------+---...
trusted_official_docs
CPython Docs
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. | +--------------+---...
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. | +--------------+---...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2b2df0e3-b202-4568-9734-03a2f6b779da
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,926
supabase-export-v2
b30fe93dad970910
determines which severity of messages it will pass to its handlers. The level set in each handler determines which messages that handler will send on. * :meth:`~Handler.setFormatter` selects a Formatter object for this handler to use.
trusted_official_docs
CPython Docs
determines which severity of messages it will pass to its handlers. The level set in each handler determines which messages that handler will send on. * :meth:`~Handler.setFormatter` selects a Formatter object for this handler to use.
determines which severity of messages it will pass to its handlers. The level set in each handler determines which messages that handler will send on. * :meth:`~Handler.setFormatter` selects a Formatter object for this handler to use.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2d9f7c79-f225-47e7-870c-5857485b0a85
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,981
supabase-export-v2
78d673b808abd81e
- %(message)s' handlers: console: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout loggers: simpleExample: level: DEBUG handlers: [console] propagate: no root: level: DEBUG handlers: [console] For more information about logging using a dictionary, see :ref:`logging-config-api`.
trusted_official_docs
CPython Docs
- %(message)s' handlers: console: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout loggers: simpleExample: level: DEBUG handlers: [console] propagate: no root: level: DEBUG handlers: [console] For more information about logging using a dictionary, see :ref:`logging-config-api`.
- %(message)s' handlers: console: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout loggers: simpleExample: level: DEBUG handlers: [console] propagate: no root: level: DEBUG handlers: [console] For more information about logging using a dictionary, see :ref:`logging-config-api`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
2e573951-9253-4ca9-9bec-b7a7fa09fa55
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,922
supabase-export-v2
740a2155f3a31e2d
Handlers ^^^^^^^^ :class:`~logging.Handler` objects are responsible for dispatching the appropriate log messages (based on the log messages' severity) to the handler's specified destination. :class:`Logger` objects can add zero or more handler objects to themselves with an :meth:`~Logger.addHandler` method. As an examp...
trusted_official_docs
CPython Docs
Handlers ^^^^^^^^ :class:`~logging.Handler` objects are responsible for dispatching the appropriate log messages (based on the log messages' severity) to the handler's specified destination. :class:`Logger` objects can add zero or more handler objects to themselves with an :meth:`~Logger.addHandler` method. As an examp...
Handlers ^^^^^^^^ :class:`~logging.Handler` objects are responsible for dispatching the appropriate log messages (based on the log messages' severity) to the handler's specified destination. :class:`Logger` objects can add zero or more handler objects to themselves with an :meth:`~Logger.addHandler` method. As an examp...
python, official-docs, cpython, P0
Local_Trusted_Corpus
30bd1da7-2e96-4194-a505-207490e74872
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,976
supabase-export-v2
5e9a7bfabee9d2b5
.. currentmodule:: logging Note that the class names referenced in config files need to be either relative to the logging module, or absolute values which can be resolved using normal import mechanisms. Thus, you could use either :class:`~logging.handlers.WatchedFileHandler` (relative to the logging module) or ``mypack...
trusted_official_docs
CPython Docs
.. currentmodule:: logging Note that the class names referenced in config files need to be either relative to the logging module, or absolute values which can be resolved using normal import mechanisms. Thus, you could use either :class:`~logging.handlers.WatchedFileHandler` (relative to the logging module) or ``mypack...
.. currentmodule:: logging Note that the class names referenced in config files need to be either relative to the logging module, or absolute values which can be resolved using normal import mechanisms. Thus, you could use either :class:`~logging.handlers.WatchedFileHandler` (relative to the logging module) or ``mypack...
python, official-docs, cpython, P0
Local_Trusted_Corpus
321eae3c-ac0d-4302-8fab-38107a75c477
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,816
supabase-export-v2
21304a9bf30415f2
Basic Logging Tutorial ---------------------- Logging is a means of tracking events that happen when some software runs. The software's developer adds logging calls to their code to indicate that certain events have occurred. An event is described by a descriptive message which can optionally contain variable data (i.e...
trusted_official_docs
CPython Docs
Basic Logging Tutorial ---------------------- Logging is a means of tracking events that happen when some software runs. The software's developer adds logging calls to their code to indicate that certain events have occurred. An event is described by a descriptive message which can optionally contain variable data (i.e...
Basic Logging Tutorial ---------------------- Logging is a means of tracking events that happen when some software runs. The software's developer adds logging calls to their code to indicate that certain events have occurred. An event is described by a descriptive message which can optionally contain variable data (i.e...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3576fd48-78ad-48e6-a4ef-7d26ecf356fe
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,916
supabase-export-v2
0a54a72aecbfcd4a
message. With regard to ``**kwargs``, the logging methods care only about a keyword of ``exc_info`` and use it to determine whether to log exception information. * :meth:`Logger.exception` creates a log message similar to :meth:`Logger.error`. The difference is that :meth:`Logger.exception` dumps a stack trace along ...
trusted_official_docs
CPython Docs
message. With regard to ``**kwargs``, the logging methods care only about a keyword of ``exc_info`` and use it to determine whether to log exception information. * :meth:`Logger.exception` creates a log message similar to :meth:`Logger.error`. The difference is that :meth:`Logger.exception` dumps a stack trace along ...
message. With regard to ``**kwargs``, the logging methods care only about a keyword of ``exc_info`` and use it to determine whether to log exception information. * :meth:`Logger.exception` creates a log message similar to :meth:`Logger.error`. The difference is that :meth:`Logger.exception` dumps a stack trace along ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3594cab4-a5d1-4052-b0fa-da24cd5702fe
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,053
supabase-export-v2
dc2607e65eca370b
| | ``asyncio``. | | +-----------------------------------------------------+---------------------------------------------------+ Also note that the core logging module only includes the basic handlers. If you don't import :mod:`logging.handlers` and :mod:`logging.config`, they won't take up any memory.
trusted_official_docs
CPython Docs
| | ``asyncio``. | | +-----------------------------------------------------+---------------------------------------------------+ Also note that the core logging module only includes the basic handlers. If you don't import :mod:`logging.handlers` and :mod:`logging.config`, they won't take up any memory.
| | ``asyncio``. | | +-----------------------------------------------------+---------------------------------------------------+ Also note that the core logging module only includes the basic handlers. If you don't import :mod:`logging.handlers` and :mod:`logging.config`, they won't take up any memory.
python, official-docs, cpython, P0
Local_Trusted_Corpus
36307a6b-8592-4d27-b9c7-ce72ab0942df
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,925
supabase-export-v2
caa3fe714ad12cae
methods that seem relevant for application developers who are using the built-in handler objects (that is, not creating custom handlers) are the following configuration methods: * The :meth:`~Handler.setLevel` method, just as in logger objects, specifies the lowest severity that will be dispatched to the appropriate d...
trusted_official_docs
CPython Docs
methods that seem relevant for application developers who are using the built-in handler objects (that is, not creating custom handlers) are the following configuration methods: * The :meth:`~Handler.setLevel` method, just as in logger objects, specifies the lowest severity that will be dispatched to the appropriate d...
methods that seem relevant for application developers who are using the built-in handler objects (that is, not creating custom handlers) are the following configuration methods: * The :meth:`~Handler.setLevel` method, just as in logger objects, specifies the lowest severity that will be dispatched to the appropriate d...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3e0b6741-494e-456e-8fc2-eeaf7afdc4ce
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,052
supabase-export-v2
b69ba568dabdb6eb
| Set ``logging.logMultiprocessing`` to ``False``. | | to manage multiple processes. | | +-----------------------------------------------------+---------------------------------------------------+ | Current :class:`asyncio.Task` name when using | Set ``logging.logAsyncioTasks`` to ``False``. | | ``asyncio``. | | +-----...
trusted_official_docs
CPython Docs
| Set ``logging.logMultiprocessing`` to ``False``. | | to manage multiple processes. | | +-----------------------------------------------------+---------------------------------------------------+ | Current :class:`asyncio.Task` name when using | Set ``logging.logAsyncioTasks`` to ``False``. | | ``asyncio``. | | +-----...
| Set ``logging.logMultiprocessing`` to ``False``. | | to manage multiple processes. | | +-----------------------------------------------------+---------------------------------------------------+ | Current :class:`asyncio.Task` name when using | Set ``logging.logAsyncioTasks`` to ``False``. | | ``asyncio``. | | +-----...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3ef23689-2308-4fb5-929d-19595c39dd48
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,984
supabase-export-v2
373f0d6837da5bb9
it is possible to have a situation where a logging event needs to be output, but no handlers can be found to output the event. The event is output using a 'handler of last resort', stored in :data:`lastResort`. This internal handler is not associated with any logger, and acts like a :class:`~logging.StreamHandler` whic...
trusted_official_docs
CPython Docs
it is possible to have a situation where a logging event needs to be output, but no handlers can be found to output the event. The event is output using a 'handler of last resort', stored in :data:`lastResort`. This internal handler is not associated with any logger, and acts like a :class:`~logging.StreamHandler` whic...
it is possible to have a situation where a logging event needs to be output, but no handlers can be found to output the event. The event is output using a 'handler of last resort', stored in :data:`lastResort`. This internal handler is not associated with any logger, and acts like a :class:`~logging.StreamHandler` whic...
python, official-docs, cpython, P0
Local_Trusted_Corpus
41f6f40c-7f89-4c79-a837-7d1aa41bbf8f
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,943
supabase-export-v2
f0bce60e8710d953
Programmers can configure logging in three ways: 1. Creating loggers, handlers, and formatters explicitly using Python code that calls the configuration methods listed above. 2. Creating a logging config file and reading it using the :func:`fileConfig` function. 3. Creating a dictionary of configuration information a...
trusted_official_docs
CPython Docs
Programmers can configure logging in three ways: 1. Creating loggers, handlers, and formatters explicitly using Python code that calls the configuration methods listed above. 2. Creating a logging config file and reading it using the :func:`fileConfig` function. 3. Creating a dictionary of configuration information a...
Programmers can configure logging in three ways: 1. Creating loggers, handlers, and formatters explicitly using Python code that calls the configuration methods listed above. 2. Creating a logging config file and reading it using the :func:`fileConfig` function. 3. Creating a dictionary of configuration information a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
426398bd-084a-419a-9a52-9b971ecd5947
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,944
supabase-export-v2
e79ebf49937ce8ac
a logging config file and reading it using the :func:`fileConfig` function. 3. Creating a dictionary of configuration information and passing it to the :func:`dictConfig` function. For the reference documentation on the last two options, see :ref:`logging-config-api`. The following example configures a very simple logg...
trusted_official_docs
CPython Docs
a logging config file and reading it using the :func:`fileConfig` function. 3. Creating a dictionary of configuration information and passing it to the :func:`dictConfig` function. For the reference documentation on the last two options, see :ref:`logging-config-api`. The following example configures a very simple logg...
a logging config file and reading it using the :func:`fileConfig` function. 3. Creating a dictionary of configuration information and passing it to the :func:`dictConfig` function. For the reference documentation on the last two options, see :ref:`logging-config-api`. The following example configures a very simple logg...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4469bc1f-119d-458b-80a1-91fbccc3e6e4
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,832
supabase-export-v2
dc1f551b5172eb3e
import logging logging.warning('Watch out!') # will print a message to the console logging.info('I told you so') # will not print anything If you type these lines into a script and run it, you'll see:
trusted_official_docs
CPython Docs
import logging logging.warning('Watch out!') # will print a message to the console logging.info('I told you so') # will not print anything If you type these lines into a script and run it, you'll see:
import logging logging.warning('Watch out!') # will print a message to the console logging.info('I told you so') # will not print anything If you type these lines into a script and run it, you'll see:
python, official-docs, cpython, P0
Local_Trusted_Corpus
46cf086d-5e37-4d21-8789-3fa98f748893
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,918
supabase-export-v2
0b190686a8f67584
little more verbose for logging messages than using the log level convenience methods listed above, but this is how to log at custom log levels. :func:`getLogger` returns a reference to a logger instance with the specified name if it is provided, or ``root`` if not. The names are period-separated hierarchical structure...
trusted_official_docs
CPython Docs
little more verbose for logging messages than using the log level convenience methods listed above, but this is how to log at custom log levels. :func:`getLogger` returns a reference to a logger instance with the specified name if it is provided, or ``root`` if not. The names are period-separated hierarchical structure...
little more verbose for logging messages than using the log level convenience methods listed above, but this is how to log at custom log levels. :func:`getLogger` returns a reference to a logger instance with the specified name if it is provided, or ``root`` if not. The names are period-separated hierarchical structure...
python, official-docs, cpython, P0
Local_Trusted_Corpus
48f573c9-417f-4120-a268-9ca08a20b8f7
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,932
supabase-export-v2
de375bf241f2acb3
.. method:: logging.Formatter.__init__(fmt=None, datefmt=None, style='%') If there is no message format string, the default is to use the raw message. If there is no date format string, the default date format is:
trusted_official_docs
CPython Docs
.. method:: logging.Formatter.__init__(fmt=None, datefmt=None, style='%') If there is no message format string, the default is to use the raw message. If there is no date format string, the default date format is:
.. method:: logging.Formatter.__init__(fmt=None, datefmt=None, style='%') If there is no message format string, the default is to use the raw message. If there is no date format string, the default date format is:
python, official-docs, cpython, P0
Local_Trusted_Corpus
493679a7-7871-45b6-bcb8-b20ff644ff4e
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,924
supabase-export-v2
68412bc60e161434
The standard library includes quite a few handler types (see :ref:`useful-handlers`); the tutorials use mainly :class:`StreamHandler` and :class:`FileHandler` in its examples. There are very few methods in a handler for application developers to concern themselves with. The only handler methods that seem relevant for a...
trusted_official_docs
CPython Docs
The standard library includes quite a few handler types (see :ref:`useful-handlers`); the tutorials use mainly :class:`StreamHandler` and :class:`FileHandler` in its examples. There are very few methods in a handler for application developers to concern themselves with. The only handler methods that seem relevant for a...
The standard library includes quite a few handler types (see :ref:`useful-handlers`); the tutorials use mainly :class:`StreamHandler` and :class:`FileHandler` in its examples. There are very few methods in a handler for application developers to concern themselves with. The only handler methods that seem relevant for a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a7268a2-377e-44d1-8abf-454f65612655
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,015
supabase-export-v2
fb0027a32d2fa550
base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:`~handlers.TimedRotatingFileHandler`. #. :class:`~handlers.RotatingFileHandler` instances send messages to disk files, with support for maximum lo...
trusted_official_docs
CPython Docs
base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:`~handlers.TimedRotatingFileHandler`. #. :class:`~handlers.RotatingFileHandler` instances send messages to disk files, with support for maximum lo...
base class for handlers that rotate log files at a certain point. It is not meant to be instantiated directly. Instead, use :class:`~handlers.RotatingFileHandler` or :class:`~handlers.TimedRotatingFileHandler`. #. :class:`~handlers.RotatingFileHandler` instances send messages to disk files, with support for maximum lo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4c53331b-71bb-4bd0-98f4-ca4775b6d8bf
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,888
supabase-export-v2
154dfe5240299fd2
loggers 'scan.text', 'scan.html' and 'scan.pdf'. Logger names can be anything you want, and indicate the area of an application in which a logged message originates. A good convention to use when naming loggers is to use a module-level logger, in each module which uses logging, named as follows::
trusted_official_docs
CPython Docs
loggers 'scan.text', 'scan.html' and 'scan.pdf'. Logger names can be anything you want, and indicate the area of an application in which a logged message originates. A good convention to use when naming loggers is to use a module-level logger, in each module which uses logging, named as follows::
loggers 'scan.text', 'scan.html' and 'scan.pdf'. Logger names can be anything you want, and indicate the area of an application in which a logged message originates. A good convention to use when naming loggers is to use a module-level logger, in each module which uses logging, named as follows::
python, official-docs, cpython, P0
Local_Trusted_Corpus
4ef5d46b-34f3-4b19-b9c3-c8ac7e071ba2
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,866
supabase-export-v2
6703c88e71ffdb86
need the *levelname* (severity), *message* (event description, including variable data) and perhaps to display when the event occurred. This is described in the next section. Displaying the date/time in messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
trusted_official_docs
CPython Docs
need the *levelname* (severity), *message* (event description, including variable data) and perhaps to display when the event occurred. This is described in the next section. Displaying the date/time in messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
need the *levelname* (severity), *message* (event description, including variable data) and perhaps to display when the event occurred. This is described in the next section. Displaying the date/time in messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python, official-docs, cpython, P0
Local_Trusted_Corpus
4f3a8b08-57e8-4950-90c2-c698543befab
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,003
supabase-export-v2
05fe9234b51459bf
logger's level is higher than the method call's, no logging message is actually generated. This is the basic mechanism controlling the verbosity of logging output. Logging messages are encoded as instances of the :class:`~logging.LogRecord` class. When a logger decides to actually log an event, a :class:`~logging.LogRe...
trusted_official_docs
CPython Docs
logger's level is higher than the method call's, no logging message is actually generated. This is the basic mechanism controlling the verbosity of logging output. Logging messages are encoded as instances of the :class:`~logging.LogRecord` class. When a logger decides to actually log an event, a :class:`~logging.LogRe...
logger's level is higher than the method call's, no logging message is actually generated. This is the basic mechanism controlling the verbosity of logging output. Logging messages are encoded as instances of the :class:`~logging.LogRecord` class. When a logger decides to actually log an event, a :class:`~logging.LogRe...
python, official-docs, cpython, P0
Local_Trusted_Corpus
512d8963-5d50-43f9-adfd-f478bee14753
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,915
supabase-export-v2
834cdf6e76a9ad85
With the logger object configured, the following methods create log messages: * :meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:`Logger.error`, and :meth:`Logger.critical` all create log records with a message and a level that corresponds to their respective method names. The message is actu...
trusted_official_docs
CPython Docs
With the logger object configured, the following methods create log messages: * :meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:`Logger.error`, and :meth:`Logger.critical` all create log records with a message and a level that corresponds to their respective method names. The message is actu...
With the logger object configured, the following methods create log messages: * :meth:`Logger.debug`, :meth:`Logger.info`, :meth:`Logger.warning`, :meth:`Logger.error`, and :meth:`Logger.critical` all create log records with a message and a level that corresponds to their respective method names. The message is actu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
52ba072a-1ab3-421c-b26f-9e2a51d1f663
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,988
supabase-export-v2
b23216e717114f5a
* If :data:`raiseExceptions` is ``False`` (production mode), the event is silently dropped. * If :data:`raiseExceptions` is ``True`` (development mode), a message 'No handlers could be found for logger X.Y.Z' is printed once.
trusted_official_docs
CPython Docs
* If :data:`raiseExceptions` is ``False`` (production mode), the event is silently dropped. * If :data:`raiseExceptions` is ``True`` (development mode), a message 'No handlers could be found for logger X.Y.Z' is printed once.
* If :data:`raiseExceptions` is ``False`` (production mode), the event is silently dropped. * If :data:`raiseExceptions` is ``True`` (development mode), a message 'No handlers could be found for logger X.Y.Z' is printed once.
python, official-docs, cpython, P0
Local_Trusted_Corpus
533f458c-e6f8-4bc5-b4bd-750b7b17377b
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,824
supabase-export-v2
0748ef7f7eac2d1f
.. tabularcolumns:: |l|L| +--------------+---------------------------------------------+ | Level | When it's used | +==============+=============================================+ | ``DEBUG`` | Detailed information, typically of interest | | | only when diagnosing problems. | +--------------+----------------------------...
trusted_official_docs
CPython Docs
.. tabularcolumns:: |l|L| +--------------+---------------------------------------------+ | Level | When it's used | +==============+=============================================+ | ``DEBUG`` | Detailed information, typically of interest | | | only when diagnosing problems. | +--------------+----------------------------...
.. tabularcolumns:: |l|L| +--------------+---------------------------------------------+ | Level | When it's used | +==============+=============================================+ | ``DEBUG`` | Detailed information, typically of interest | | | only when diagnosing problems. | +--------------+----------------------------...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5404fb39-bb14-4a73-8a36-f134d1b54761
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,972
supabase-export-v2
31c373d24077f713
- simpleExample - WARNING - warn message 2005-03-19 15:38:56,055 - simpleExample - ERROR - error message 2005-03-19 15:38:56,130 - simpleExample - CRITICAL - critical message You can see that the config file approach has a few advantages over the Python code approach, mainly separation of configuration and code and the...
trusted_official_docs
CPython Docs
- simpleExample - WARNING - warn message 2005-03-19 15:38:56,055 - simpleExample - ERROR - error message 2005-03-19 15:38:56,130 - simpleExample - CRITICAL - critical message You can see that the config file approach has a few advantages over the Python code approach, mainly separation of configuration and code and the...
- simpleExample - WARNING - warn message 2005-03-19 15:38:56,055 - simpleExample - ERROR - error message 2005-03-19 15:38:56,130 - simpleExample - CRITICAL - critical message You can see that the config file approach has a few advantages over the Python code approach, mainly separation of configuration and code and the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
553d22b0-4426-4e95-9528-67c0e6fab517
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,817
supabase-export-v2
22f6789579a78efe
of the event). Events also have an importance which the developer ascribes to the event; the importance can also be called the *level* or *severity*. When to use logging ^^^^^^^^^^^^^^^^^^^
trusted_official_docs
CPython Docs
of the event). Events also have an importance which the developer ascribes to the event; the importance can also be called the *level* or *severity*. When to use logging ^^^^^^^^^^^^^^^^^^^
of the event). Events also have an importance which the developer ascribes to the event; the importance can also be called the *level* or *severity*. When to use logging ^^^^^^^^^^^^^^^^^^^
python, official-docs, cpython, P0
Local_Trusted_Corpus
56defcb2-bad1-4a99-8789-be732070352f
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,835
supabase-export-v2
cc95d856f95a5591
the logging call, i.e. 'Watch out!'. The actual output can be formatted quite flexibly if you need that; formatting options will also be explained later. Notice that in this example, we use functions directly on the ``logging`` module, like ``logging.debug``, rather than creating a logger and calling functions on it. T...
trusted_official_docs
CPython Docs
the logging call, i.e. 'Watch out!'. The actual output can be formatted quite flexibly if you need that; formatting options will also be explained later. Notice that in this example, we use functions directly on the ``logging`` module, like ``logging.debug``, rather than creating a logger and calling functions on it. T...
the logging call, i.e. 'Watch out!'. The actual output can be formatted quite flexibly if you need that; formatting options will also be explained later. Notice that in this example, we use functions directly on the ``logging`` module, like ``logging.debug``, rather than creating a logger and calling functions on it. T...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5c9d37f0-8e3b-4402-8515-22e7133cb6fd
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,865
supabase-export-v2
7d8882351278845c
DEBUG:This message should appear on the console INFO:So should this WARNING:And this, too Notice that the 'root' which appeared in earlier examples has disappeared. For a full set of things that can appear in format strings, you can refer to the documentation for :ref:`logrecord-attributes`, but for simple usage, you j...
trusted_official_docs
CPython Docs
DEBUG:This message should appear on the console INFO:So should this WARNING:And this, too Notice that the 'root' which appeared in earlier examples has disappeared. For a full set of things that can appear in format strings, you can refer to the documentation for :ref:`logrecord-attributes`, but for simple usage, you j...
DEBUG:This message should appear on the console INFO:So should this WARNING:And this, too Notice that the 'root' which appeared in earlier examples has disappeared. For a full set of things that can appear in format strings, you can refer to the documentation for :ref:`logrecord-attributes`, but for simple usage, you j...
python, official-docs, cpython, P0
Local_Trusted_Corpus
601268e4-e473-426f-965b-99e18fdeee0b
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,046
supabase-export-v2
fbfafb5e1e7b4278
level argument and returns true if the event would be created by the Logger for that level of call. You can write code like this:: if logger.isEnabledFor(logging.DEBUG): logger.debug('Message with %s, %s', expensive_func1(), expensive_func2())
trusted_official_docs
CPython Docs
level argument and returns true if the event would be created by the Logger for that level of call. You can write code like this:: if logger.isEnabledFor(logging.DEBUG): logger.debug('Message with %s, %s', expensive_func1(), expensive_func2())
level argument and returns true if the event would be created by the Logger for that level of call. You can write code like this:: if logger.isEnabledFor(logging.DEBUG): logger.debug('Message with %s, %s', expensive_func1(), expensive_func2())
python, official-docs, cpython, P0
Local_Trusted_Corpus
6477f106-d769-4f1f-b829-60e648950b60
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,907
supabase-export-v2
e190d8d5b6e1dcc0
Loggers ^^^^^^^ :class:`Logger` objects have a threefold job. First, they expose several methods to application code so that applications can log messages at runtime. Second, logger objects determine which log messages to act upon based upon severity (the default filtering facility) or filter objects. Third, logger obj...
trusted_official_docs
CPython Docs
Loggers ^^^^^^^ :class:`Logger` objects have a threefold job. First, they expose several methods to application code so that applications can log messages at runtime. Second, logger objects determine which log messages to act upon based upon severity (the default filtering facility) or filter objects. Third, logger obj...
Loggers ^^^^^^^ :class:`Logger` objects have a threefold job. First, they expose several methods to application code so that applications can log messages at runtime. Second, logger objects determine which log messages to act upon based upon severity (the default filtering facility) or filter objects. Third, logger obj...
python, official-docs, cpython, P0
Local_Trusted_Corpus
681e2eb3-3260-4e27-9d54-b6a78854ea4a
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,992
supabase-export-v2
6725e2d8ee171489
Configuring Logging for a Library ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When developing a library which uses logging, you should take care to document how the library uses logging - for example, the names of loggers used. Some consideration also needs to be given to its logging configuration. If the using application does ...
trusted_official_docs
CPython Docs
Configuring Logging for a Library ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When developing a library which uses logging, you should take care to document how the library uses logging - for example, the names of loggers used. Some consideration also needs to be given to its logging configuration. If the using application does ...
Configuring Logging for a Library ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When developing a library which uses logging, you should take care to document how the library uses logging - for example, the names of loggers used. Some consideration also needs to be given to its logging configuration. If the using application does ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
68ad0f3d-6a1d-410e-af91-992d5b7f76db
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,837
supabase-export-v2
bcd144dde9951e9d
Logging to a file ^^^^^^^^^^^^^^^^^ A very common situation is that of recording logging events in a file, so let's look at that next. Be sure to try the following in a newly started Python interpreter, and don't just continue from the session described above::
trusted_official_docs
CPython Docs
Logging to a file ^^^^^^^^^^^^^^^^^ A very common situation is that of recording logging events in a file, so let's look at that next. Be sure to try the following in a newly started Python interpreter, and don't just continue from the session described above::
Logging to a file ^^^^^^^^^^^^^^^^^ A very common situation is that of recording logging events in a file, so let's look at that next. Be sure to try the following in a newly started Python interpreter, and don't just continue from the session described above::
python, official-docs, cpython, P0
Local_Trusted_Corpus
68df0a58-4092-4df1-a3cd-9e63dce2d190
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,903
supabase-export-v2
401d04ec60488086
the pydoc theme is updated to set the dark-theme class, this snippet * won't be needed any more. */ (function() { var oldActivateTheme = activateTheme; function updateBody(theme) { let elem = document.body;
trusted_official_docs
CPython Docs
the pydoc theme is updated to set the dark-theme class, this snippet * won't be needed any more. */ (function() { var oldActivateTheme = activateTheme; function updateBody(theme) { let elem = document.body;
the pydoc theme is updated to set the dark-theme class, this snippet * won't be needed any more. */ (function() { var oldActivateTheme = activateTheme; function updateBody(theme) { let elem = document.body;
python, official-docs, cpython, P0
Local_Trusted_Corpus
6dcb2ad4-6b3f-48dc-9952-3cc214e01fb4
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,051
supabase-export-v2
fefb9d1d4b5df9ca
may help to speed up your code in environments | | | like PyPy (which can't speed up code that uses | | | :func:`sys._getframe`). | +-----------------------------------------------------+---------------------------------------------------+ | Threading information. | Set ``logging.logThreads`` to ``False``. | +---------...
trusted_official_docs
CPython Docs
may help to speed up your code in environments | | | like PyPy (which can't speed up code that uses | | | :func:`sys._getframe`). | +-----------------------------------------------------+---------------------------------------------------+ | Threading information. | Set ``logging.logThreads`` to ``False``. | +---------...
may help to speed up your code in environments | | | like PyPy (which can't speed up code that uses | | | :func:`sys._getframe`). | +-----------------------------------------------------+---------------------------------------------------+ | Threading information. | Set ``logging.logThreads`` to ``False``. | +---------...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e1b7614-35e5-47dd-8a4c-0240ce092f14
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,997
supabase-export-v2
ddb5871feedabb5c
should have the desired effect. If an organisation produces a number of libraries, then the logger name specified can be 'orgname.foo' rather than just 'foo'. .. note:: It is strongly advised that you *do not log to the root logger* in your library. Instead, use a logger with a unique and easily identifiable name, su...
trusted_official_docs
CPython Docs
should have the desired effect. If an organisation produces a number of libraries, then the logger name specified can be 'orgname.foo' rather than just 'foo'. .. note:: It is strongly advised that you *do not log to the root logger* in your library. Instead, use a logger with a unique and easily identifiable name, su...
should have the desired effect. If an organisation produces a number of libraries, then the logger name specified can be 'orgname.foo' rather than just 'foo'. .. note:: It is strongly advised that you *do not log to the root logger* in your library. Instead, use a logger with a unique and easily identifiable name, su...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e268176-ad6b-4e21-a4b8-fe7ba29a45ed
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,001
supabase-export-v2
1863d34b1ce4a648
relative to the predefined levels. If you define a level with the same numeric value, it overwrites the predefined value; the predefined name is lost. +--------------+---------------+ | Level | Numeric value | +==============+===============+ | ``CRITICAL`` | 50 | +--------------+---------------+ | ``ERROR`` | 40 | +--...
trusted_official_docs
CPython Docs
relative to the predefined levels. If you define a level with the same numeric value, it overwrites the predefined value; the predefined name is lost. +--------------+---------------+ | Level | Numeric value | +==============+===============+ | ``CRITICAL`` | 50 | +--------------+---------------+ | ``ERROR`` | 40 | +--...
relative to the predefined levels. If you define a level with the same numeric value, it overwrites the predefined value; the predefined name is lost. +--------------+---------------+ | Level | Numeric value | +==============+===============+ | ``CRITICAL`` | 50 | +--------------+---------------+ | ``ERROR`` | 40 | +--...
python, official-docs, cpython, P0
Local_Trusted_Corpus
702d2ed1-cdc2-4753-8ad8-b374d2aeded7
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,031
supabase-export-v2
58280b9fadf02144
for presentation through instances of the :class:`Formatter` class. They are initialized with a format string suitable for use with the % operator and a dictionary. For formatting multiple messages in a batch, instances of :class:`BufferingFormatter` can be used. In addition to the format string (which is applied to ea...
trusted_official_docs
CPython Docs
for presentation through instances of the :class:`Formatter` class. They are initialized with a format string suitable for use with the % operator and a dictionary. For formatting multiple messages in a batch, instances of :class:`BufferingFormatter` can be used. In addition to the format string (which is applied to ea...
for presentation through instances of the :class:`Formatter` class. They are initialized with a format string suitable for use with the % operator and a dictionary. For formatting multiple messages in a batch, instances of :class:`BufferingFormatter` can be used. In addition to the format string (which is applied to ea...
python, official-docs, cpython, P0
Local_Trusted_Corpus
71604753-cf6d-4e94-b442-4b8d503b57fa
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,860
supabase-export-v2
63317d6a4f70877d
as :meth:`str.format` and :class:`string.Template`. These newer formatting options *are* supported, but exploring them is outside the scope of this tutorial: see :ref:`formatting-styles` for more information. Changing the format of displayed messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
trusted_official_docs
CPython Docs
as :meth:`str.format` and :class:`string.Template`. These newer formatting options *are* supported, but exploring them is outside the scope of this tutorial: see :ref:`formatting-styles` for more information. Changing the format of displayed messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
as :meth:`str.format` and :class:`string.Template`. These newer formatting options *are* supported, but exploring them is outside the scope of this tutorial: see :ref:`formatting-styles` for more information. Changing the format of displayed messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python, official-docs, cpython, P0
Local_Trusted_Corpus
745e56ff-d0f2-4e8b-b61b-05f0b6ddd4dd
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,902
supabase-export-v2
9cb8d662f7e86e05
.. raw:: html <script> /* * This snippet is needed to handle the case where a light or dark theme is * chosen via the theme is selected in the page. We call the existing handler * and then add a dark-theme class to the body when the dark theme is selected. * The SVG styling (above) then does the rest. * * If the p...
trusted_official_docs
CPython Docs
.. raw:: html <script> /* * This snippet is needed to handle the case where a light or dark theme is * chosen via the theme is selected in the page. We call the existing handler * and then add a dark-theme class to the body when the dark theme is selected. * The SVG styling (above) then does the rest. * * If the p...
.. raw:: html <script> /* * This snippet is needed to handle the case where a light or dark theme is * chosen via the theme is selected in the page. We call the existing handler * and then add a dark-theme class to the body when the dark theme is selected. * The SVG styling (above) then does the rest. * * If the p...
python, official-docs, cpython, P0
Local_Trusted_Corpus
752920f0-ad13-4646-89a3-32fd59927842
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,939
supabase-export-v2
de237acaa413dad5
'%(asctime)s - %(levelname)s - %(message)s' Formatters use a user-configurable function to convert the creation time of a record to a tuple. By default, :func:`time.localtime` is used; to change this for a particular formatter instance, set the ``converter`` attribute of the instance to a function with the same signatu...
trusted_official_docs
CPython Docs
'%(asctime)s - %(levelname)s - %(message)s' Formatters use a user-configurable function to convert the creation time of a record to a tuple. By default, :func:`time.localtime` is used; to change this for a particular formatter instance, set the ``converter`` attribute of the instance to a function with the same signatu...
'%(asctime)s - %(levelname)s - %(message)s' Formatters use a user-configurable function to convert the creation time of a record to a tuple. By default, :func:`time.localtime` is used; to change this for a particular formatter instance, set the ``converter`` attribute of the instance to a function with the same signatu...
python, official-docs, cpython, P0
Local_Trusted_Corpus
757cebb3-65e5-41a2-9e42-c58680eb265e
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,908
supabase-export-v2
bae074d193b0a04e
act upon based upon severity (the default filtering facility) or filter objects. Third, logger objects pass along relevant log messages to all interested log handlers. The most widely used methods on logger objects fall into two categories: configuration and message sending.
trusted_official_docs
CPython Docs
act upon based upon severity (the default filtering facility) or filter objects. Third, logger objects pass along relevant log messages to all interested log handlers. The most widely used methods on logger objects fall into two categories: configuration and message sending.
act upon based upon severity (the default filtering facility) or filter objects. Third, logger objects pass along relevant log messages to all interested log handlers. The most widely used methods on logger objects fall into two categories: configuration and message sending.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7cb98488-d7da-484c-8b1a-bca135f144d6
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,980
supabase-export-v2
8e36dee035dd8311
.. code-block:: yaml version: 1 formatters: simple: format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' handlers: console: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout loggers: simpleExample: level: DEBUG handlers: [console] propagate: no root: level: D...
trusted_official_docs
CPython Docs
.. code-block:: yaml version: 1 formatters: simple: format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' handlers: console: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout loggers: simpleExample: level: DEBUG handlers: [console] propagate: no root: level: D...
.. code-block:: yaml version: 1 formatters: simple: format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' handlers: console: class: logging.StreamHandler level: DEBUG formatter: simple stream: ext://sys.stdout loggers: simpleExample: level: DEBUG handlers: [console] propagate: no root: level: D...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7cc60fb5-57f9-4301-8fda-fb736ec46fba
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,038
supabase-export-v2
6ca49e4548fe5ad9
:class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never swallowed. Other exceptions which occur during the :meth:`~Handler.emit` method of a :class:`Handler` subclass are passed to its :meth:`~Handler.handleError` method. The default implementation of :meth:`~Handler.handleError` in :class:`Handler` che...
trusted_official_docs
CPython Docs
:class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never swallowed. Other exceptions which occur during the :meth:`~Handler.emit` method of a :class:`Handler` subclass are passed to its :meth:`~Handler.handleError` method. The default implementation of :meth:`~Handler.handleError` in :class:`Handler` che...
:class:`SystemExit` and :class:`KeyboardInterrupt` exceptions are never swallowed. Other exceptions which occur during the :meth:`~Handler.emit` method of a :class:`Handler` subclass are passed to its :meth:`~Handler.handleError` method. The default implementation of :meth:`~Handler.handleError` in :class:`Handler` che...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7dee1f56-0667-49c7-b8dd-ae8a34990f86
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,827
supabase-export-v2
3f9e2c7ddfb158d2
level is ``WARNING``, which means that only events of this severity and higher will be tracked, unless the logging package is configured to do otherwise. Events that are tracked can be handled in different ways. The simplest way of handling tracked events is to print them to the console. Another common way is to write ...
trusted_official_docs
CPython Docs
level is ``WARNING``, which means that only events of this severity and higher will be tracked, unless the logging package is configured to do otherwise. Events that are tracked can be handled in different ways. The simplest way of handling tracked events is to print them to the console. Another common way is to write ...
level is ``WARNING``, which means that only events of this severity and higher will be tracked, unless the logging package is configured to do otherwise. Events that are tracked can be handled in different ways. The simplest way of handling tracked events is to print them to the console. Another common way is to write ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7f754618-4d83-46b4-bc77-bc29a805bc9e
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,912
supabase-export-v2
10fecd13264ea1da
* :meth:`Logger.addHandler` and :meth:`Logger.removeHandler` add and remove handler objects from the logger object. Handlers are covered in more detail in :ref:`handler-basic`. * :meth:`Logger.addFilter` and :meth:`Logger.removeFilter` add and remove filter objects from the logger object. Filters are covered in more d...
trusted_official_docs
CPython Docs
* :meth:`Logger.addHandler` and :meth:`Logger.removeHandler` add and remove handler objects from the logger object. Handlers are covered in more detail in :ref:`handler-basic`. * :meth:`Logger.addFilter` and :meth:`Logger.removeFilter` add and remove filter objects from the logger object. Filters are covered in more d...
* :meth:`Logger.addHandler` and :meth:`Logger.removeHandler` add and remove handler objects from the logger object. Handlers are covered in more detail in :ref:`handler-basic`. * :meth:`Logger.addFilter` and :meth:`Logger.removeFilter` add and remove filter objects from the logger object. Filters are covered in more d...
python, official-docs, cpython, P0
Local_Trusted_Corpus
806df219-c0c3-440e-9572-5b38f76ea1bc
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,025
supabase-export-v2
7d515074bcd678bb
it is closed and reopened using the file name. This handler is only useful on Unix-like systems; Windows does not support the underlying mechanism used. #. :class:`~handlers.QueueHandler` instances send messages to a queue, such as those implemented in the :mod:`queue` or :mod:`multiprocessing` modules.
trusted_official_docs
CPython Docs
it is closed and reopened using the file name. This handler is only useful on Unix-like systems; Windows does not support the underlying mechanism used. #. :class:`~handlers.QueueHandler` instances send messages to a queue, such as those implemented in the :mod:`queue` or :mod:`multiprocessing` modules.
it is closed and reopened using the file name. This handler is only useful on Unix-like systems; Windows does not support the underlying mechanism used. #. :class:`~handlers.QueueHandler` instances send messages to a queue, such as those implemented in the :mod:`queue` or :mod:`multiprocessing` modules.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8286af31-4040-438f-ba77-3adcb51d187d
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,930
supabase-export-v2
e5012991dc981ef6
Formatters ^^^^^^^^^^ Formatter objects configure the final order, structure, and contents of the log message. Unlike the base :class:`logging.Handler` class, application code may instantiate formatter classes, although you could likely subclass the formatter if your application needs special behavior. The constructor ...
trusted_official_docs
CPython Docs
Formatters ^^^^^^^^^^ Formatter objects configure the final order, structure, and contents of the log message. Unlike the base :class:`logging.Handler` class, application code may instantiate formatter classes, although you could likely subclass the formatter if your application needs special behavior. The constructor ...
Formatters ^^^^^^^^^^ Formatter objects configure the final order, structure, and contents of the log message. Unlike the base :class:`logging.Handler` class, application code may instantiate formatter classes, although you could likely subclass the formatter if your application needs special behavior. The constructor ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
84f7cfe4-cdbc-4c31-9087-517f4b15f1cb
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,928
supabase-export-v2
c97627588b3b26ed
* :meth:`~Handler.addFilter` and :meth:`~Handler.removeFilter` respectively configure and deconfigure filter objects on handlers. Application code should not directly instantiate and use instances of :class:`Handler`. Instead, the :class:`Handler` class is a base class that defines the interface that all handlers shoul...
trusted_official_docs
CPython Docs
* :meth:`~Handler.addFilter` and :meth:`~Handler.removeFilter` respectively configure and deconfigure filter objects on handlers. Application code should not directly instantiate and use instances of :class:`Handler`. Instead, the :class:`Handler` class is a base class that defines the interface that all handlers shoul...
* :meth:`~Handler.addFilter` and :meth:`~Handler.removeFilter` respectively configure and deconfigure filter objects on handlers. Application code should not directly instantiate and use instances of :class:`Handler`. Instead, the :class:`Handler` class is a base class that defines the interface that all handlers shoul...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8637e1d0-baf9-42ce-8601-cb92702a232c
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,848
supabase-export-v2
979e54d5160e3bad
getattr(logging, loglevel.upper()) to get the value which you'll pass to :func:`basicConfig` via the *level* argument. You may want to error check any user input value, perhaps as in the following example::
trusted_official_docs
CPython Docs
getattr(logging, loglevel.upper()) to get the value which you'll pass to :func:`basicConfig` via the *level* argument. You may want to error check any user input value, perhaps as in the following example::
getattr(logging, loglevel.upper()) to get the value which you'll pass to :func:`basicConfig` via the *level* argument. You may want to error check any user input value, perhaps as in the following example::
python, official-docs, cpython, P0
Local_Trusted_Corpus
86909184-f68c-43d5-984b-57d178c678c7
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,819
supabase-export-v2
d58c0850be1b3ab2
to use when, see the table below. It states, for each of a set of common tasks, the best tool to use for that task. +-------------------------------------+--------------------------------------+ | Task you want to perform | The best tool for the task | +=====================================+============================...
trusted_official_docs
CPython Docs
to use when, see the table below. It states, for each of a set of common tasks, the best tool to use for that task. +-------------------------------------+--------------------------------------+ | Task you want to perform | The best tool for the task | +=====================================+============================...
to use when, see the table below. It states, for each of a set of common tasks, the best tool to use for that task. +-------------------------------------+--------------------------------------+ | Task you want to perform | The best tool for the task | +=====================================+============================...
python, official-docs, cpython, P0
Local_Trusted_Corpus
86cf4631-5934-4283-9009-bf2c28d321de
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,045
supabase-export-v2
1f4633e3aac0b665
Optimization ------------ Formatting of message arguments is deferred until it cannot be avoided. However, computing the arguments passed to the logging method can also be expensive, and you may want to avoid doing it if the logger will just throw away your event. To decide what to do, you can call the :meth:`~Logger.i...
trusted_official_docs
CPython Docs
Optimization ------------ Formatting of message arguments is deferred until it cannot be avoided. However, computing the arguments passed to the logging method can also be expensive, and you may want to avoid doing it if the logger will just throw away your event. To decide what to do, you can call the :meth:`~Logger.i...
Optimization ------------ Formatting of message arguments is deferred until it cannot be avoided. However, computing the arguments passed to the logging method can also be expensive, and you may want to avoid doing it if the logger will just throw away your event. To decide what to do, you can call the :meth:`~Logger.i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
874c16c7-ce34-4917-a335-352de91b06a7
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,891
supabase-export-v2
c623b7b458a0aab0
This means that logger names track the package/module hierarchy, and it's intuitively obvious where events are logged just from the logger name. The root of the hierarchy of loggers is called the root logger. That's the logger used by the functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :func:`...
trusted_official_docs
CPython Docs
This means that logger names track the package/module hierarchy, and it's intuitively obvious where events are logged just from the logger name. The root of the hierarchy of loggers is called the root logger. That's the logger used by the functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :func:`...
This means that logger names track the package/module hierarchy, and it's intuitively obvious where events are logged just from the logger name. The root of the hierarchy of loggers is called the root logger. That's the logger used by the functions :func:`debug`, :func:`info`, :func:`warning`, :func:`error` and :func:`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
882b8d72-16c5-48a9-92ed-57dca6aceddc
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,049
supabase-export-v2
5bfe617773f075b5
cached value would only need to be recomputed when the logging configuration changes dynamically while the application is running (which is not all that common). There are other optimizations which can be made for specific applications which need more precise control over what logging information is collected. Here's a...
trusted_official_docs
CPython Docs
cached value would only need to be recomputed when the logging configuration changes dynamically while the application is running (which is not all that common). There are other optimizations which can be made for specific applications which need more precise control over what logging information is collected. Here's a...
cached value would only need to be recomputed when the logging configuration changes dynamically while the application is running (which is not all that common). There are other optimizations which can be made for specific applications which need more precise control over what logging information is collected. Here's a...
python, official-docs, cpython, P0
Local_Trusted_Corpus
88c3ce7f-5251-492d-9bd2-99f1cecea732
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,851
supabase-export-v2
fc771886e0055486
come *before* any calls to a logger's methods such as :meth:`~Logger.debug`, :meth:`~Logger.info`, etc. Otherwise, that logging event may not be handled in the desired manner. If you run the above script several times, the messages from successive runs are appended to the file *example.log*. If you want each run to sta...
trusted_official_docs
CPython Docs
come *before* any calls to a logger's methods such as :meth:`~Logger.debug`, :meth:`~Logger.info`, etc. Otherwise, that logging event may not be handled in the desired manner. If you run the above script several times, the messages from successive runs are appended to the file *example.log*. If you want each run to sta...
come *before* any calls to a logger's methods such as :meth:`~Logger.debug`, :meth:`~Logger.info`, etc. Otherwise, that logging event may not be handled in the desired manner. If you run the above script several times, the messages from successive runs are appended to the file *example.log*. If you want each run to sta...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8994c226-b1e8-4f8d-b4bd-6d3202461213
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,971
supabase-export-v2
8e944d27f77491c7
.. code-block:: shell-session $ python simple_logging_config.py 2005-03-19 15:38:55,977 - simpleExample - DEBUG - debug message 2005-03-19 15:38:55,979 - simpleExample - INFO - info message 2005-03-19 15:38:56,054 - simpleExample - WARNING - warn message 2005-03-19 15:38:56,055 - simpleExample - ERROR - error messa...
trusted_official_docs
CPython Docs
.. code-block:: shell-session $ python simple_logging_config.py 2005-03-19 15:38:55,977 - simpleExample - DEBUG - debug message 2005-03-19 15:38:55,979 - simpleExample - INFO - info message 2005-03-19 15:38:56,054 - simpleExample - WARNING - warn message 2005-03-19 15:38:56,055 - simpleExample - ERROR - error messa...
.. code-block:: shell-session $ python simple_logging_config.py 2005-03-19 15:38:55,977 - simpleExample - DEBUG - debug message 2005-03-19 15:38:55,979 - simpleExample - INFO - info message 2005-03-19 15:38:56,054 - simpleExample - WARNING - warn message 2005-03-19 15:38:56,055 - simpleExample - ERROR - error messa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8b2d33ef-39bb-4a3a-a3a7-03677defd72c
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,936
supabase-export-v2
a00adb741a5e162a
compatible with :meth:`str.format` (using keyword arguments), while if the style is ``'$'`` then the message format string should conform to what is expected by :meth:`string.Template.substitute`. .. versionchanged:: 3.2 Added the ``style`` parameter.
trusted_official_docs
CPython Docs
compatible with :meth:`str.format` (using keyword arguments), while if the style is ``'$'`` then the message format string should conform to what is expected by :meth:`string.Template.substitute`. .. versionchanged:: 3.2 Added the ``style`` parameter.
compatible with :meth:`str.format` (using keyword arguments), while if the style is ``'$'`` then the message format string should conform to what is expected by :meth:`string.Template.substitute`. .. versionchanged:: 3.2 Added the ``style`` parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8bb96184-ac04-4480-99c2-d2c8ca324483
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,017
supabase-export-v2
056fd8993f3c0d4e
#. :class:`~handlers.TimedRotatingFileHandler` instances send messages to disk files, rotating the log file at certain timed intervals. #. :class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. Since 3.4, Unix domain sockets are also supported.
trusted_official_docs
CPython Docs
#. :class:`~handlers.TimedRotatingFileHandler` instances send messages to disk files, rotating the log file at certain timed intervals. #. :class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. Since 3.4, Unix domain sockets are also supported.
#. :class:`~handlers.TimedRotatingFileHandler` instances send messages to disk files, rotating the log file at certain timed intervals. #. :class:`~handlers.SocketHandler` instances send messages to TCP/IP sockets. Since 3.4, Unix domain sockets are also supported.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8bff1142-75b8-4ff5-91f1-09d1a4728548
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
58,886
supabase-export-v2
ef2e3d8991eae498
Filters provide a finer grained facility for determining which log records to output. * Formatters specify the layout of log records in the final output. Log event information is passed between loggers, handlers, filters and formatters in a :class:`LogRecord` instance.
trusted_official_docs
CPython Docs
Filters provide a finer grained facility for determining which log records to output. * Formatters specify the layout of log records in the final output. Log event information is passed between loggers, handlers, filters and formatters in a :class:`LogRecord` instance.
Filters provide a finer grained facility for determining which log records to output. * Formatters specify the layout of log records in the final output. Log event information is passed between loggers, handlers, filters and formatters in a :class:`LogRecord` instance.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8e8a2dc0-87e6-4066-bc6b-7e481b5bac31
CPython Docs
file://datasets/cpython/Doc/howto/logging.rst
unknown
8d832e9f-2a60-4904-9a27-2cce1f85641f
59,029
supabase-export-v2
c777226db75b17b6
.. versionadded:: 3.2 The :class:`~handlers.QueueHandler` class. The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler` classes are defined in the core logging package. The other handlers are defined in a sub-module, :mod:`logging.handlers`. (There is also another sub-module, :mod:`logging.config`, f...
trusted_official_docs
CPython Docs
.. versionadded:: 3.2 The :class:`~handlers.QueueHandler` class. The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler` classes are defined in the core logging package. The other handlers are defined in a sub-module, :mod:`logging.handlers`. (There is also another sub-module, :mod:`logging.config`, f...
.. versionadded:: 3.2 The :class:`~handlers.QueueHandler` class. The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler` classes are defined in the core logging package. The other handlers are defined in a sub-module, :mod:`logging.handlers`. (There is also another sub-module, :mod:`logging.config`, f...
python, official-docs, cpython, P0
Local_Trusted_Corpus