以下の手順では、デバッグ情報を生成するように CUPS を構成する方法と、それを取得する方法について説明します。
構成
1. cups 設定ファイル /etc/cups/cupsd.conf を開きます テキスト エディタで。
# vi /etc/cups/cupsd.conf
次のようになります:
MaxLogSize 0 # # "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $" # # Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a # complete description of this file. # # Log general information in error_log - change "warn" to "debug" # for troubleshooting... LogLevel warn
または
# # "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $" # # Sample configuration file for the Common UNIX Printing System (CUPS) # scheduler. See "man cupsd.conf" for a complete description of this # file. # # Log general information in error_log - change "info" to "debug" for # troubleshooting... LogLevel info
2. LogLevel 行を次のように編集する必要があります:
LogLevel debug2
3. ファイルを保存します。
ログを取得する方法
1. root ユーザーとして 2 つの異なるターミナル ウィンドウを開きます。
2. いずれかのターミナルで次のコマンドを実行します:
# tail -f /var/log/cups/error_log > /tmp/cups_debug_error.txt
次の手順が実行されている間、このコマンドを実行します。
3. 他の端末で、次の操作を行います:
# service cups restart
4. プリンターで直面している問題を再現する手順に従います。
– 最初のターミナルで、Ctrl-C を押してテール コマンドを停止します。
– ログが取得されたら、ログレベルをデフォルトにリセットし、cups サービスを再起動します。
LogLevel のその他のオプション
- デバッグ 2 – すべてをログに記録
- デバッグ – ほとんどすべてをログに記録する
- 情報 – すべてのリクエストと状態の変化をログに記録します。
- 警告 – エラーと警告をログに記録する
- エラー – エラーのみをログに記録します。
- なし – 何も記録しない