Translated message

A translation of this page exists in English.

ロガーが stdin 経由で送信されたメッセージを不要に 1024 バイトのチャンクに分割する

Solution In Progress - Updated -

Issue

  • RHEL のすべてのバージョンにおいて、logger コマンドは stdin 経由で送信されたメッセージを 1024 バイト (または 1 KiB) のチャンクに分割するようです。対照的に、入力メッセージが cmdline 引数として渡された場合 (例: logger $(perl -E 'say "a" x 2000))、logger はメッセージを分割または切り捨てません。

  • 次のようなディレクティブを使用して、ログを syslog に送信するように Apache httpd を設定しました。

    CustomLog "|/bin/logger -t httpd -p local0.info" common
    ErrorLog "|/bin/logger -t httpd -p local0.err"
    

    ただし、syslog 側では、1000 文字を超えるメッセージは複数のログエントリーに分割されます。

  • How can an application in RHEL7 write logs directly to local/remote rsyslog, bypassing journald? の指示に従いましたが、ロガーは長いメッセージを 1k の制限で分割しているようです。

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content