@@ -14,7 +14,7 @@ msgid ""
14
14
msgstr ""
15
15
"Project-Id-Version : Python 3.11\n "
16
16
"Report-Msgid-Bugs-To : \n "
17
- "POT-Creation-Date : 2023-03-03 14:14 +0000\n "
17
+ "POT-Creation-Date : 2023-03-10 14:15 +0000\n "
18
18
"PO-Revision-Date : 2021-06-28 00:53+0000\n "
19
19
"Last-Translator : Takeshi Nakazato, 2023\n "
20
20
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ "
@@ -280,18 +280,27 @@ msgid ""
280
280
"filter_maker`` in the filter configuration. You will need to change that if "
281
281
"you define it in a different module."
282
282
msgstr ""
283
+ "この関数は引数として与えられた文字列をログレベルの数値に変換し、ログレコード"
284
+ "内のログレベルが指定されたレベル以下の場合に ``True`` を返す関数を返します。"
285
+ "この例では ``filter_maker`` をコマンドラインから実行するテストスクリプト "
286
+ "``main.py`` で関数が定義されているため、フィルター設定上のモジュール名は "
287
+ "``__main__`` になります。そのためフィルター設定の中では ``__main__."
288
+ "filter_maker`` となります。異なるモジュールで関数を定義した場合、この部分を変"
289
+ "更する必要があります。"
283
290
284
291
#: ../../howto/logging-cookbook.rst:383
285
292
msgid "With the filter added, we can run ``main.py``, which in full is:"
286
293
msgstr ""
294
+ "フィルターを追加した ``main.py`` の全体像は以下のようになり、これで実行できる"
295
+ "状態になりました:"
287
296
288
297
#: ../../howto/logging-cookbook.rst:453
289
298
msgid "And after running it like this:"
290
- msgstr ""
299
+ msgstr "これを以下のように実行します: "
291
300
292
301
#: ../../howto/logging-cookbook.rst:459
293
302
msgid "We can see the results are as expected:"
294
- msgstr ""
303
+ msgstr "すると期待通りの結果を得ることができます: "
295
304
296
305
#: ../../howto/logging-cookbook.rst:485
297
306
msgid "Configuration server example"
@@ -412,6 +421,14 @@ msgid ""
412
421
"application, to use the above approach for logging, so that any blocking "
413
422
"code runs only in the ``QueueListener`` thread."
414
423
msgstr ""
424
+ "上述の議論は特に同期コードにについてのものではなく、むしろ遅いロギングハンド"
425
+ "ラについてでしたが、非同期コードやネットワーク、あるいはファイルハンドラから"
426
+ "のロギングでさえも (イベントループをブロックしてしまう) 問題につながる可能性"
427
+ "があることには注意すべきでしょう。これはいくつかのロギングが :mod:`asyncio` "
428
+ "内部で行われることが理由です。何らかの非同期コードがアプリケーションの中で使"
429
+ "われている場合、ロギングには上記のアプローチを使っていかなるブロッキングコー"
430
+ "ドも ``QueueListener`` スレッド内だけで実行されるようにしておくことが最も良い"
431
+ "でしょう。"
415
432
416
433
#: ../../howto/logging-cookbook.rst:615
417
434
msgid ""
@@ -480,7 +497,7 @@ msgstr ""
480
497
481
498
#: ../../howto/logging-cookbook.rst:766
482
499
msgid "Running a logging socket listener in production"
483
- msgstr ""
500
+ msgstr "作成中のロギングソケットのリスナーを実行する "
484
501
485
502
#: ../../howto/logging-cookbook.rst:770
486
503
msgid ""
@@ -489,78 +506,87 @@ msgid ""
489
506
"Gist <socket-listener-gist_>`__ which provides the bare-bones files to run "
490
507
"the above functionality using Supervisor. It consists of the following files:"
491
508
msgstr ""
509
+ "作成中のロギングリスナーを実行するためには、 `Supervisor <http://supervisord."
510
+ "org/>`_ のようなプロセス管理ツールを使う必要があるかもしれません。 `こちらの "
511
+ "Gist <socket-listener-gist_>`__ は Supervisor を使って上記の機能を実行するた"
512
+ "めの必要最低限のファイルを提供しています。以下のファイルが必要になります:"
492
513
493
514
#: ../../howto/logging-cookbook.rst:777
494
515
msgid "File"
495
- msgstr ""
516
+ msgstr "ファイル "
496
517
497
518
#: ../../howto/logging-cookbook.rst:777
498
519
msgid "Purpose"
499
520
msgstr "目的"
500
521
501
522
#: ../../howto/logging-cookbook.rst:779
502
523
msgid ":file:`prepare.sh`"
503
- msgstr ""
524
+ msgstr ":file:`prepare.sh` "
504
525
505
526
#: ../../howto/logging-cookbook.rst:779
506
527
msgid "A Bash script to prepare the environment for testing"
507
- msgstr ""
528
+ msgstr "試験用の環境を準備する Bash スクリプト "
508
529
509
530
#: ../../howto/logging-cookbook.rst:782
510
531
msgid ":file:`supervisor.conf`"
511
- msgstr ""
532
+ msgstr ":file:`supervisor.conf` "
512
533
513
534
#: ../../howto/logging-cookbook.rst:782
514
535
msgid ""
515
536
"The Supervisor configuration file, which has entries for the listener and a "
516
537
"multi-process web application"
517
538
msgstr ""
539
+ "リスナーとマルチプロセスの web アプリケーションのための設定を含む Supervisor "
540
+ "の設定ファイル"
518
541
519
542
#: ../../howto/logging-cookbook.rst:786
520
543
msgid ":file:`ensure_app.sh`"
521
- msgstr ""
544
+ msgstr ":file:`ensure_app.sh` "
522
545
523
546
#: ../../howto/logging-cookbook.rst:786
524
547
msgid ""
525
548
"A Bash script to ensure that Supervisor is running with the above "
526
549
"configuration"
527
550
msgstr ""
551
+ "Supervisor が上記の設定で実行されていることを保証するための Bash スクリプト"
528
552
529
553
#: ../../howto/logging-cookbook.rst:789
530
554
msgid ":file:`log_listener.py`"
531
- msgstr ""
555
+ msgstr ":file:`log_listener.py` "
532
556
533
557
#: ../../howto/logging-cookbook.rst:789
534
558
msgid ""
535
559
"The socket listener program which receives log events and records them to a "
536
560
"file"
537
- msgstr ""
561
+ msgstr "ログイベントを受信してファイルに記録するソケットリスナープログラム "
538
562
539
563
#: ../../howto/logging-cookbook.rst:792
540
564
msgid ":file:`main.py`"
541
- msgstr ""
565
+ msgstr ":file:`main.py` "
542
566
543
567
#: ../../howto/logging-cookbook.rst:792
544
568
msgid ""
545
569
"A simple web application which performs logging via a socket connected to "
546
570
"the listener"
547
571
msgstr ""
572
+ "リスナーに接続されたソケットを通じてロギングを実行する簡単な web アプリケー"
573
+ "ション"
548
574
549
575
#: ../../howto/logging-cookbook.rst:795
550
576
msgid ":file:`webapp.json`"
551
- msgstr ""
577
+ msgstr ":file:`webapp.json` "
552
578
553
579
#: ../../howto/logging-cookbook.rst:795
554
580
msgid "A JSON configuration file for the web application"
555
- msgstr ""
581
+ msgstr "web アプリケーションのための JSON 設定ファイル "
556
582
557
583
#: ../../howto/logging-cookbook.rst:797
558
584
msgid ":file:`client.py`"
559
- msgstr ""
585
+ msgstr ":file:`client.py` "
560
586
561
587
#: ../../howto/logging-cookbook.rst:797
562
588
msgid "A Python script to exercise the web application"
563
- msgstr ""
589
+ msgstr "web アプリケーションを起動するための Python スクリプト "
564
590
565
591
#: ../../howto/logging-cookbook.rst:800
566
592
msgid ""
@@ -570,20 +596,28 @@ msgid ""
570
596
"same log file without conflicting with one another --- they all go through "
571
597
"the socket listener."
572
598
msgstr ""
599
+ "この web アプリケーションは、リクエストを処理する複数のワーカープロセスを起動"
600
+ "する web アプリケーションサーバーである `Gunicorn <https://gunicorn.org/>`_ "
601
+ "を使っています。ここに例として挙げた設定は、複数のワーカーがいかにして互いに"
602
+ "衝突することなく同じログファイルに書き込みを行うことができるかを示しています "
603
+ "--- ワーカーは全てソケットリスナーを通じてログを書き込むのです。"
573
604
574
605
#: ../../howto/logging-cookbook.rst:805
575
606
msgid "To test these files, do the following in a POSIX environment:"
576
607
msgstr ""
608
+ "これらのファイルを試すためには、 POSIX 環境において以下を行なってください:"
577
609
578
610
#: ../../howto/logging-cookbook.rst:807
579
611
msgid ""
580
612
"Download `the Gist <socket-listener-gist_>`__ as a ZIP archive using the :"
581
613
"guilabel:`Download ZIP` button."
582
614
msgstr ""
615
+ ":guilabel:`Download ZIP` ボタンを押して `Gist <socket-listener-gist_>`__ を "
616
+ "ZIP アーカイブとしてダウンロードしてください。"
583
617
584
618
#: ../../howto/logging-cookbook.rst:810
585
619
msgid "Unzip the above files from the archive into a scratch directory."
586
- msgstr ""
620
+ msgstr "アーカイブファイルをスクラッチディレクトリに展開してください。 "
587
621
588
622
#: ../../howto/logging-cookbook.rst:812
589
623
msgid ""
@@ -592,18 +626,27 @@ msgid ""
592
626
"files, and a :file:`venv` subdirectory to contain a virtual environment into "
593
627
"which ``bottle``, ``gunicorn`` and ``supervisor`` are installed."
594
628
msgstr ""
629
+ "準備のために、スクラッチディレクトリにおいて ``bash prepare.sh`` を実行してく"
630
+ "ださい。これにより Supervisor 関連のファイルおよびログファイルのための :file:"
631
+ "`run` サブディレクトリ、および ``bottle``, ``gunicorn`` そして "
632
+ "``supervisor`` がインストールされる仮想環境を含む :file:`venv` サブディレクト"
633
+ "リが生成されます。"
595
634
596
635
#: ../../howto/logging-cookbook.rst:817
597
636
msgid ""
598
637
"Run ``bash ensure_app.sh`` to ensure that Supervisor is running with the "
599
638
"above configuration."
600
639
msgstr ""
640
+ "``bash ensure_app.sh`` を実行して Supervisor が上記の設定で実行されていること"
641
+ "を確認してください。"
601
642
602
643
#: ../../howto/logging-cookbook.rst:820
603
644
msgid ""
604
645
"Run ``venv/bin/python client.py`` to exercise the web application, which "
605
646
"will lead to records being written to the log."
606
647
msgstr ""
648
+ "``venv/bin/python client.py`` を実行して web アプリケーションを起動してくださ"
649
+ "い。これによりログにレコードが書き込まれるはずです。"
607
650
608
651
#: ../../howto/logging-cookbook.rst:823
609
652
msgid ""
@@ -612,18 +655,26 @@ msgid ""
612
655
"won't be in any particular order, since they have been handled concurrently "
613
656
"by different worker processes in a non-deterministic way."
614
657
msgstr ""
658
+ ":file:`run` サブディレクトリにあるログファイルを調べてください。最新のログ"
659
+ "は、パターン :file:`app.log*` に一致する名前のファイルにあるはずです。ログは"
660
+ "異なるワーカープロセスによって非決定論的な形で並行に処理されるため、特定の決"
661
+ "まった順番にはなりません。"
615
662
616
663
#: ../../howto/logging-cookbook.rst:828
617
664
msgid ""
618
665
"You can shut down the listener and the web application by running ``venv/bin/"
619
666
"supervisorctl -c supervisor.conf shutdown``."
620
667
msgstr ""
668
+ "リスナーと web アプリケーションは ``venv/bin/supervisorctl -c supervisor."
669
+ "conf shutdown`` を実行することでシャットダウンできます。"
621
670
622
671
#: ../../howto/logging-cookbook.rst:831
623
672
msgid ""
624
673
"You may need to tweak the configuration files in the unlikely event that the "
625
674
"configured ports clash with something else in your test environment."
626
675
msgstr ""
676
+ "ありそうもないことですが、テスト環境で設定したポートが別の設定と衝突してし"
677
+ "まった場合、設定ファイルを修正する必要があるかもしれません。"
627
678
628
679
#: ../../howto/logging-cookbook.rst:837
629
680
msgid "Adding contextual information to your logging output"
@@ -805,7 +856,7 @@ msgstr "実行すると、以下のようになります:"
805
856
806
857
#: ../../howto/logging-cookbook.rst:996
807
858
msgid "Use of ``contextvars``"
808
- msgstr ""
859
+ msgstr "``contextvars`` の利用 "
809
860
810
861
#: ../../howto/logging-cookbook.rst:998
811
862
msgid ""
@@ -816,6 +867,12 @@ msgid ""
816
867
"logs can populated with contextual information such as, for example, request "
817
868
"attributes handled by web applications."
818
869
msgstr ""
870
+ "Python 3.7 以降、 :mod:`contextvars` モジュールは :mod:`threading` と :mod:"
871
+ "`asyncio` の両方の処理上のニーズを満たすコンテキストローカルな変数を提供して"
872
+ "います。このタイプの変数はスレッドローカルな変数に適しています。以下の例は、"
873
+ "マルチスレッド環境において、 いかにして web アプリケーションによって処理され"
874
+ "るリクエスト属性のような処理の文脈上の情報とともにログを投入できるかを示しま"
875
+ "す。"
819
876
820
877
#: ../../howto/logging-cookbook.rst:1004
821
878
msgid ""
0 commit comments