ログシステムの概要
OpenClaw Gatewayのログシステムはサービス実行のすべての重要なイベントを記録し、トラブルシューティングとセキュリティ監査の基盤となります。
基本設定
{
"logging": {
"level": "info",
"format": "json",
"console": true,
"file": {
"enabled": true,
"path": "~/.openclaw/logs/gateway.log",
"maxSize": "50m",
"maxFiles": 10
}
}
}
ログの確認
openclaw logs --follow
openclaw logs --level error
openclaw logs --since "1h"
openclaw logs --grep "timeout"
ログローテーション
{
"logging": {
"file": {
"maxSize": "50m",
"maxFiles": 10,
"compress": true
}
}
}
外部システムへのログ送信
Syslog、Lokiなどの外部システムへのログ転送に対応しています。
機密情報のマスク
{
"logging": {
"redact": {
"enabled": true,
"patterns": ["apiKey", "token", "password"],
"replacement": "***REDACTED***"
}
}
}
まとめ
ログシステムはOpenClaw運用の「目」です。ログレベルの適切な設定、ログローテーションの有効化、機密情報のマスク、集中ストレージシステムへのログ送信が、オブザーバビリティ基盤構築の基本です。