8000 PEP 282: Improve upon colloquial phrasing (#2667) · python/peps@b9a70c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9a70c2

Browse files
KebapCAM-Gerlachvsajip
authored
PEP 282: Improve upon colloquial phrasing (#2667)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
1 parent 2563e2a commit b9a70c2

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

pep-0282.txt

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Simple Example
6464
This shows a very simple example of how the logging package can be
6565
used to generate simple logging output on stderr.
6666

67-
::
67+
.. code-block:: python
6868

6969
--------- mymodule.py -------------------------------
7070
import logging
@@ -76,6 +76,8 @@ used to generate simple logging output on stderr.
7676
raise TypeError, "Bogus type error for testing"
7777
-----------------------------------------------------
7878

79+
.. code-block:: python
80+
7981
--------- myapp.py ----------------------------------
8082
import mymodule, logging
8183

@@ -91,7 +93,9 @@ used to generate simple logging output on stderr.
9193
log.info("Ending my app")
9294
-----------------------------------------------------
9395

94-
% python myapp.py
96+
.. code-block:: console
97+
98+
$ python myapp.py
9599

96100
INFO:MyApp: Starting my app
97101
DEBUG:MyModule: Doin' stuff...
@@ -107,7 +111,9 @@ used to generate simple logging output on stderr.
107111

108112
The above example shows the default output format. All
109113
aspects of the output format should be configurable, so that
110-
you could have output formatted like this::
114+
you could have output formatted like this:
115+
116+
.. code-block:: text
111117

112118
2002-04-19 07:56:58,174 MyModule DEBUG - Doin' stuff...
113119

@@ -127,11 +133,9 @@ Logger names fit into a "dotted name" namespace, with dots
127133
(periods) indicating sub-namespaces. The namespace of logger
128134
objects therefore corresponds to a single tree data structure.
129135

130-
::
131-
132-
"" is the root of the namespace
133-
"Zope" would be a child node of the root
134-
"Zope.ZODB" would be a child node of "Zope"
136+
* ``""`` is the root of the namespace
137+
* ``"Zope"`` would be a child node of the root
138+
* ``"Zope.ZODB"`` would be a child node of ``"Zope"``
135139

136140
These Logger objects create **LogRecord** objects which are passed
137141
to **Handler** objects for output. Both Loggers and Handlers may
@@ -170,13 +174,13 @@ This is done through a module-level function::
170174
Levels
171175
======
172176

173-
The logging levels, in increasing order of importance, are::
177+
The logging levels, in increasing order of importance, are:
174178

175-
DEBUG
176-
INFO
177-
WARN
178-
ERROR
179-
CRITICAL
179+
* DEBUG
180+
* INFO
181+
* WARN
182+
* ERROR
183+
* CRITICAL
180184

181185
The term CRITICAL is used in preference to FATAL, which is used by
182186
log4j. The levels are conceptually the same - that of a serious,

0 commit comments

Comments
 (0)
0