@@ -135,89 +135,89 @@ msgid ""
135135"The logging functions are named after the level or severity of the events "
136136"they are used to track. The standard levels and their applicability are "
137137"described below (in increasing order of severity):"
138- msgstr ""
138+ msgstr "日志功能应以所追踪事件级别或严重性而定。各级别适用性如下(以严重性递增): "
139139
140140#: ../../howto/logging.rst:69 ../../howto/logging.rst:846
141141msgid "Level"
142- msgstr ""
142+ msgstr "级别 "
143143
144144#: ../../howto/logging.rst:69
145145msgid "When it's used"
146- msgstr ""
146+ msgstr "何时使用 "
147147
148148#: ../../howto/logging.rst:71 ../../howto/logging.rst:856
149149msgid "``DEBUG``"
150- msgstr ""
150+ msgstr "``DEBUG`` "
151151
152152#: ../../howto/logging.rst:71
153153msgid ""
154154"Detailed information, typically of interest only when diagnosing problems."
155- msgstr ""
155+ msgstr "细节信息,仅当诊断问题时适用。 "
156156
157157#: ../../howto/logging.rst:74 ../../howto/logging.rst:854
158158msgid "``INFO``"
159- msgstr ""
159+ msgstr "``INFO`` "
160160
161161#: ../../howto/logging.rst:74
162162msgid "Confirmation that things are working as expected."
163- msgstr ""
163+ msgstr "确认程序按预期运行 "
164164
165165#: ../../howto/logging.rst:77 ../../howto/logging.rst:852
166166msgid "``WARNING``"
167- msgstr ""
167+ msgstr "``WARNING`` "
168168
169169#: ../../howto/logging.rst:77
170170msgid ""
171171"An indication that something unexpected happened, or indicative of some "
172172"problem in the near future (e.g. 'disk space low'). The software is still "
173173"working as expected."
174- msgstr ""
174+ msgstr "表明有已经或即将发生的意外(例如:磁盘空间不足)。程序仍按预期进行 "
175175
176176#: ../../howto/logging.rst:82 ../../howto/logging.rst:850
177177msgid "``ERROR``"
178- msgstr ""
178+ msgstr "``ERROR`` "
179179
180180#: ../../howto/logging.rst:82
181181msgid ""
182182"Due to a more serious problem, the software has not been able to perform "
183183"some function."
184- msgstr ""
184+ msgstr "由于严重的问题,程序的某些功能已经不能正常执行 "
185185
186186#: ../../howto/logging.rst:85 ../../howto/logging.rst:848
187187msgid "``CRITICAL``"
188- msgstr ""
188+ msgstr "``CRITICAL`` "
189189
190190#: ../../howto/logging.rst:85
191191msgid ""
192192"A serious error, indicating that the program itself may be unable to "
193193"continue running."
194- msgstr ""
194+ msgstr "严重的错误,表明程序已不能继续执行 "
195195
196196#: ../../howto/logging.rst:89
197197msgid ""
198198"The default level is ``WARNING``, which means that only events of this level"
199199" and above will be tracked, unless the logging package is configured to do "
200200"otherwise."
201- msgstr ""
201+ msgstr "默认的级别是``WARNING``,意味着只会追踪该级别及以上的事件,除非更改日志配置。 "
202202
203203#: ../../howto/logging.rst:93
204204msgid ""
205205"Events that are tracked can be handled in different ways. The simplest way "
206206"of handling tracked events is to print them to the console. Another common "
207207"way is to write them to a disk file."
208- msgstr ""
208+ msgstr "所追踪事件可以以不同形式处理。最简单的方式是输出到控制台。另一种常用的方式是写入磁盘文件。 "
209209
210210#: ../../howto/logging.rst:101
211211msgid "A simple example"
212- msgstr ""
212+ msgstr "一个简单的例子 "
213213
214214#: ../../howto/logging.rst:103
215215msgid "A very simple example is::"
216- msgstr ""
216+ msgstr "一个非常简单的例子: "
217217
218218#: ../../howto/logging.rst:109
219219msgid "If you type these lines into a script and run it, you'll see:"
220- msgstr ""
220+ msgstr "如果你在命令行中输入这些代码并运行,你将会看到: "
221221
222222#: ../../howto/logging.rst:115
223223msgid ""
@@ -228,24 +228,27 @@ msgid ""
228228"explained later. The actual output can be formatted quite flexibly if you "
229229"need that; formatting options will also be explained later."
230230msgstr ""
231+ "输出到命令行。``INFO`` 消息并没有出现,因为默认级别是``WARNING`` "
232+ "。打印的信息包含事件的级别以及在日志调用中的对于事件的描述,例如'Watch out!' "
233+ "。暂时不用担心‘root’:之后会作出解释。输出格式可按需要进行调整,格式化选项同样会在之后作出解释。"
231234
232235#: ../../howto/logging.rst:124
233236msgid "Logging to a file"
234- msgstr ""
237+ msgstr "记录日志到文件 "
235238
236239#: ../../howto/logging.rst:126
237240msgid ""
238241"A very common situation is that of recording logging events in a file, so "
239242"let's look at that next. Be sure to try the following in a newly-started "
240243"Python interpreter, and don't just continue from the session described "
241244"above::"
242- msgstr ""
245+ msgstr "一种非常常见的情况是将日志事件记录到文件,让我们继续往下看。请确认启动新的Python 解释器,不要在上一个环境中继续操作:: "
243246
244247#: ../../howto/logging.rst:136
245248msgid ""
246249"And now if we open the file and look at what we have, we should find the log"
247250" messages:"
248- msgstr ""
251+ msgstr "现在,如果我们打开日志文件,我们应当能看到日志信息: "
249252
250253#: ../../howto/logging.rst:145
251254msgid ""
0 commit comments