From 12acf2543fb5bc0c78108b628307474e2080516e Mon Sep 17 00:00:00 2001 From: Durable Workflow Date: Wed, 21 Oct 2026 23:36:25 +0000 Subject: [PATCH] Document container stderr and JSON logging in all eight languages --- docs/polyglot/server-config-reference.md | 18 +++++++++++++++++- .../polyglot/server-config-reference.md | 18 +++++++++++++++++- i18n/de/source-hashes.json | 2 +- .../polyglot/server-config-reference.md | 18 +++++++++++++++++- i18n/es/source-hashes.json | 2 +- .../polyglot/server-config-reference.md | 19 ++++++++++++++++++- i18n/fr/source-hashes.json | 2 +- .../polyglot/server-config-reference.md | 18 +++++++++++++++++- i18n/ja/source-hashes.json | 2 +- .../polyglot/server-config-reference.md | 18 +++++++++++++++++- i18n/pt-BR/source-hashes.json | 2 +- .../polyglot/server-config-reference.md | 18 +++++++++++++++++- i18n/uk/source-hashes.json | 2 +- .../polyglot/server-config-reference.md | 16 +++++++++++++++- i18n/zh-Hans/source-hashes.json | 2 +- 15 files changed, 142 insertions(+), 15 deletions(-) diff --git a/docs/polyglot/server-config-reference.md b/docs/polyglot/server-config-reference.md index dbfa60bed58..c21d5595b32 100644 --- a/docs/polyglot/server-config-reference.md +++ b/docs/polyglot/server-config-reference.md @@ -339,12 +339,28 @@ Durable Workflow API knobs. | Group | Variables | Use | | --- | --- | --- | | Application | `APP_NAME`, `APP_ENV`, `APP_KEY`, `APP_DEBUG`, `APP_URL`, `APP_VERSION`, locale, timezone, maintenance, and cipher settings | Laravel application runtime identity and boot behavior. | -| Logging | `LOG_CHANNEL`, `LOG_LEVEL`, stack, daily, Slack, and Papertrail settings | Laravel logging destinations and retention. | +| Logging | `LOG_CHANNEL`, `LOG_LEVEL`, `LOG_STDERR_FORMATTER`, stack, daily, Slack, and Papertrail settings | Laravel logging destinations, formatting and retention. | | Database | `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `DB_SOCKET`, `DB_URL`, charset, collation, and foreign-key settings | SQL state store for workflow, namespace, worker, and projection tables. | | Redis/cache/queue | `REDIS_*`, `QUEUE_CONNECTION`, `QUEUE_FAILED_DRIVER`, `CACHE_STORE`, `CACHE_PREFIX`, `SESSION_*` | Queue workers, cache locks, long-poll signaling, and web/session runtime support. | | Filesystems/mail/broadcasting | `FILESYSTEM_DISK`, `MAIL_*`, `BROADCAST_*`, `PUSHER_*`, `AWS_*` | Framework integrations used by deployment-specific features. | | Build/runtime | `MYSQL_VERSION`, `REDIS_VERSION`, `PHP_CLI_SERVER_WORKERS`, `VITE_APP_NAME`, `BCRYPT_ROUNDS` | Docker Compose images and framework runtime behavior. | +## Container logs + +Set `LOG_CHANNEL=stderr` on API, worker and scheduler containers so `docker logs` +or `kubectl logs` can collect application logs. Set it explicitly on existing +releases. Use `LOG_LEVEL` to select the minimum severity. For newline-delimited +JSON, also set: + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +Restart persistent roles after changing these settings because configuration is +cached at startup. An explicit file channel needs its own storage and collection; +Kubernetes does not collect `storage/logs/laravel.log` automatically. +`DW_LOG_FORMAT` is not a supported setting. + ## Migration Notes When migrating an older deployment, change the public name first and leave the diff --git a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index ee960a8b395..1a6c7e7ee43 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -278,12 +278,28 @@ Infrastrukturvariablen konfigurieren Framework und Abhängigkeiten. Die Server-P | Gruppe | Variablen | Verwendung | | --- | --- | --- | | Anwendung | `APP_NAME`, `APP_ENV`, `APP_KEY`, `APP_DEBUG`, `APP_URL`, `APP_VERSION`, Sprach-, Zeitzonen-, Wartungs- und Verschlüsselungseinstellungen | Identität und Startverhalten der Laravel-Anwendung. | -| Protokollierung | `LOG_CHANNEL`, `LOG_LEVEL`, Einstellungen für stack, daily, Slack und Papertrail | Ziele und Aufbewahrung der Laravel-Protokolle. | +| Protokollierung | `LOG_CHANNEL`, `LOG_LEVEL`, `LOG_STDERR_FORMATTER`, Einstellungen für stack, daily, Slack und Papertrail | Ziele, Formatierung und Aufbewahrung der Laravel-Protokolle. | | Datenbank | `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `DB_SOCKET`, `DB_URL`, Zeichensatz-, Sortier- und Fremdschlüsseleinstellungen | SQL-Zustandsspeicher für Workflow-, Namespace-, Worker- und Projektionstabellen. | | Redis/Cache/Queue | `REDIS_*`, `QUEUE_CONNECTION`, `QUEUE_FAILED_DRIVER`, `CACHE_STORE`, `CACHE_PREFIX`, `SESSION_*` | Queue-Worker, Cache-Sperren, Long-Poll-Signale und Web-/Sitzungsunterstützung. | | Dateisysteme/E-Mail/Broadcasting | `FILESYSTEM_DISK`, `MAIL_*`, `BROADCAST_*`, `PUSHER_*`, `AWS_*` | Framework-Integrationen für bereitstellungsspezifische Funktionen. | | Build/Laufzeit | `MYSQL_VERSION`, `REDIS_VERSION`, `PHP_CLI_SERVER_WORKERS`, `VITE_APP_NAME`, `BCRYPT_ROUNDS` | Docker-Compose-Images und Laufzeitverhalten des Frameworks. | +## Container-Protokolle {#container-logs} + +Setzen Sie `LOG_CHANNEL=stderr` für API-, Worker- und Scheduler-Container, damit +`docker logs` oder `kubectl logs` die Anwendungsprotokolle erfassen kann. Setzen +Sie die Variable bei bestehenden Versionen ausdrücklich. Mit `LOG_LEVEL` wählen +Sie den Mindestschweregrad. Für JSON mit einem Datensatz pro Zeile setzen Sie zusätzlich: + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +Starten Sie dauerhafte Prozesse nach Änderungen neu, da die Konfiguration beim +Start zwischengespeichert wird. Ein ausdrücklich gewählter Dateikanal benötigt +eigene Speicherung und Erfassung; Kubernetes erfasst +`storage/logs/laravel.log` nicht automatisch. `DW_LOG_FORMAT` wird nicht unterstützt. + ## Hinweise zur Migration {#migration-notes} Stellen Sie bei der Migration einer älteren Bereitstellung auf den öffentlichen Namen um und lassen Sie den alten Namen ungesetzt. Falls beide vorhanden sind, ist der `DW_*`-Wert für die Betriebsplanung maßgeblich; entfernen Sie den alten Namen. diff --git a/i18n/de/source-hashes.json b/i18n/de/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index d7da73ce98c..62a73699c9d 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -278,12 +278,28 @@ Las variables de infraestructura de ejecución controlan el framework y sus depe | Grupo | Variables | Uso | | --- | --- | --- | | Aplicación | `APP_NAME`, `APP_ENV`, `APP_KEY`, `APP_DEBUG`, `APP_URL`, `APP_VERSION`, idioma, zona horaria, mantenimiento y cifrado | Identidad y comportamiento de arranque de la aplicación Laravel. | -| Registros | `LOG_CHANNEL`, `LOG_LEVEL`, opciones de stack, daily, Slack y Papertrail | Destinos y retención de registros de Laravel. | +| Registros | `LOG_CHANNEL`, `LOG_LEVEL`, `LOG_STDERR_FORMATTER`, opciones de stack, daily, Slack y Papertrail | Destinos, formato y retención de registros de Laravel. | | Base de datos | `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `DB_SOCKET`, `DB_URL`, juego de caracteres, cotejamiento y claves foráneas | Almacén SQL de estado para tablas de workflows, namespaces, workers y proyecciones. | | Redis/caché/cola | `REDIS_*`, `QUEUE_CONNECTION`, `QUEUE_FAILED_DRIVER`, `CACHE_STORE`, `CACHE_PREFIX`, `SESSION_*` | Workers de cola, bloqueos de caché, señales de long polling y soporte web y de sesiones. | | Archivos/correo/difusión | `FILESYSTEM_DISK`, `MAIL_*`, `BROADCAST_*`, `PUSHER_*`, `AWS_*` | Integraciones del framework usadas por funciones propias de cada despliegue. | | Compilación/ejecución | `MYSQL_VERSION`, `REDIS_VERSION`, `PHP_CLI_SERVER_WORKERS`, `VITE_APP_NAME`, `BCRYPT_ROUNDS` | Imágenes de Docker Compose y comportamiento de ejecución del framework. | +## Registros de contenedores {#container-logs} + +Establece `LOG_CHANNEL=stderr` en los contenedores de API, workers y planificador +para que `docker logs` o `kubectl logs` recopilen los registros de la aplicación. +Configúralo explícitamente en las versiones existentes. Usa `LOG_LEVEL` para +elegir la gravedad mínima. Para JSON con un registro por línea, añade: + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +Reinicia los procesos persistentes después de cambiar estas opciones, ya que la +configuración se almacena en caché al arrancar. Un canal de archivo elegido +explícitamente necesita almacenamiento y recopilación propios; Kubernetes no +recopila `storage/logs/laravel.log` automáticamente. `DW_LOG_FORMAT` no es una opción admitida. + ## Notas de migración {#migration-notes} Al migrar un despliegue antiguo, cambie primero al nombre público y deje sin definir el nombre antiguo. Si ambos están presentes, los operadores deben considerar el valor `DW_*` y eliminar el nombre antiguo. diff --git a/i18n/es/source-hashes.json b/i18n/es/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index d22f011ecee..2889d317b24 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -278,12 +278,29 @@ Les variables d’infrastructure règlent le framework et ses dépendances. L’ | Groupe | Variables | Utilisation | | --- | --- | --- | | Application | `APP_NAME`, `APP_ENV`, `APP_KEY`, `APP_DEBUG`, `APP_URL`, `APP_VERSION`, langue, fuseau horaire, maintenance et chiffrement | Identité et comportement de démarrage de l’application Laravel. | -| Journaux | `LOG_CHANNEL`, `LOG_LEVEL`, paramètres stack, daily, Slack et Papertrail | Destinations et conservation des journaux Laravel. | +| Journaux | `LOG_CHANNEL`, `LOG_LEVEL`, `LOG_STDERR_FORMATTER`, paramètres stack, daily, Slack et Papertrail | Destinations, format et conservation des journaux Laravel. | | Base de données | `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `DB_SOCKET`, `DB_URL`, jeu de caractères, collation et clés étrangères | Stockage SQL des tables de workflows, namespaces, workers et projections. | | Redis/cache/file | `REDIS_*`, `QUEUE_CONNECTION`, `QUEUE_FAILED_DRIVER`, `CACHE_STORE`, `CACHE_PREFIX`, `SESSION_*` | Workers de file, verrous du cache, signaux long poll et prise en charge du web et des sessions. | | Systèmes de fichiers/courrier/diffusion | `FILESYSTEM_DISK`, `MAIL_*`, `BROADCAST_*`, `PUSHER_*`, `AWS_*` | Intégrations du framework utilisées par les fonctions propres au déploiement. | | Construction/exécution | `MYSQL_VERSION`, `REDIS_VERSION`, `PHP_CLI_SERVER_WORKERS`, `VITE_APP_NAME`, `BCRYPT_ROUNDS` | Images Docker Compose et comportement d’exécution du framework. | +## Journaux des conteneurs {#container-logs} + +Définissez `LOG_CHANNEL=stderr` sur les conteneurs API, workers et ordonnanceur +pour que `docker logs` ou `kubectl logs` collecte les journaux applicatifs. +Définissez-le explicitement sur les versions existantes. `LOG_LEVEL` sélectionne +la gravité minimale. Pour du JSON avec un enregistrement par ligne, ajoutez : + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +Redémarrez les processus persistants après toute modification, car la +configuration est mise en cache au démarrage. Un canal de fichier choisi +explicitement nécessite son propre stockage et sa propre collecte ; Kubernetes +ne collecte pas automatiquement `storage/logs/laravel.log`. +`DW_LOG_FORMAT` n'est pas un paramètre pris en charge. + ## Notes de migration {#migration-notes} Lors de la migration d’un ancien déploiement, passez au nom public et laissez l’ancien nom non défini. Si les deux sont présents, les opérateurs doivent se baser sur la valeur `DW_*` et supprimer l’ancien nom. diff --git a/i18n/fr/source-hashes.json b/i18n/fr/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index 44227c47cb1..c7419457ff2 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -278,12 +278,28 @@ CI とデプロイ用マニフェストには `DW_V2_GUARDRAILS_BOOT` を使用 | 分類 | 変数 | 用途 | | --- | --- | --- | | アプリケーション | `APP_NAME`、`APP_ENV`、`APP_KEY`、`APP_DEBUG`、`APP_URL`、`APP_VERSION`、ロケール、タイムゾーン、メンテナンス、暗号設定 | Laravel アプリケーションの実行時識別情報と起動動作。 | -| ログ | `LOG_CHANNEL`、`LOG_LEVEL`、スタック、日次、Slack、Papertrail の設定 | Laravel のログ出力先と保持。 | +| ログ | `LOG_CHANNEL`、`LOG_LEVEL`、`LOG_STDERR_FORMATTER`、スタック、日次、Slack、Papertrail の設定 | Laravel のログ出力先、形式、保持。 | | データベース | `DB_CONNECTION`、`DB_HOST`、`DB_PORT`、`DB_DATABASE`、`DB_USERNAME`、`DB_PASSWORD`、`DB_SOCKET`、`DB_URL`、文字セット、照合順序、外部キーの設定 | ワークフロー、Namespace、Worker、プロジェクションを保存する SQL データベース。 | | Redis・キャッシュ・キュー | `REDIS_*`、`QUEUE_CONNECTION`、`QUEUE_FAILED_DRIVER`、`CACHE_STORE`、`CACHE_PREFIX`、`SESSION_*` | キューワーカー、キャッシュロック、ロングポーリング通知、Web・セッションの実行時サポート。 | | ファイルシステム・メール・配信 | `FILESYSTEM_DISK`、`MAIL_*`、`BROADCAST_*`、`PUSHER_*`、`AWS_*` | デプロイ固有の機能で使用するフレームワーク連携。 | | ビルド・実行環境 | `MYSQL_VERSION`、`REDIS_VERSION`、`PHP_CLI_SERVER_WORKERS`、`VITE_APP_NAME`、`BCRYPT_ROUNDS` | Docker Compose のイメージとフレームワークの実行時動作。 | +## コンテナのログ {#container-logs} + +API、ワーカー、スケジューラーの各コンテナで `LOG_CHANNEL=stderr` を設定すると、 +`docker logs` または `kubectl logs` でアプリケーションログを収集できます。 +既存のリリースでは明示的に設定してください。`LOG_LEVEL` で最低重大度を選択します。 +1 行に 1 レコードの JSON を出力するには、次も設定します。 + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +起動時に設定がキャッシュされるため、変更後は常駐プロセスを再起動してください。 +ファイルチャネルを明示的に選ぶ場合は、保存先と収集方法を別途用意する必要があります。 +Kubernetes は `storage/logs/laravel.log` を自動収集しません。 +`DW_LOG_FORMAT` はサポートされる設定ではありません。 + ## 移行時の注意事項 {#migration-notes} 古いデプロイを移行する場合は、まず公開名へ変更し、旧名は未設定にします。両方が設定されている場合、運用時は `DW_*` の値を基準として考え、旧名を削除してください。 diff --git a/i18n/ja/source-hashes.json b/i18n/ja/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index 44bb87b8002..ada5b39aefd 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -278,12 +278,28 @@ As variáveis de infraestrutura de execução controlam o framework e suas depen | Grupo | Variáveis | Uso | | --- | --- | --- | | Aplicação | `APP_NAME`, `APP_ENV`, `APP_KEY`, `APP_DEBUG`, `APP_URL`, `APP_VERSION`, idioma, fuso horário, manutenção e criptografia | Identidade e comportamento de inicialização da aplicação Laravel. | -| Logs | `LOG_CHANNEL`, `LOG_LEVEL`, opções de stack, daily, Slack e Papertrail | Destinos e retenção dos logs do Laravel. | +| Logs | `LOG_CHANNEL`, `LOG_LEVEL`, `LOG_STDERR_FORMATTER`, opções de stack, daily, Slack e Papertrail | Destinos, formatação e retenção dos logs do Laravel. | | Banco de dados | `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `DB_SOCKET`, `DB_URL`, conjunto de caracteres, collation e chaves estrangeiras | Armazenamento SQL de estado das tabelas de workflows, namespaces, workers e projeções. | | Redis/cache/fila | `REDIS_*`, `QUEUE_CONNECTION`, `QUEUE_FAILED_DRIVER`, `CACHE_STORE`, `CACHE_PREFIX`, `SESSION_*` | Workers de fila, bloqueios de cache, sinais de long polling e suporte web e de sessões. | | Arquivos/e-mail/difusão | `FILESYSTEM_DISK`, `MAIL_*`, `BROADCAST_*`, `PUSHER_*`, `AWS_*` | Integrações do framework usadas por recursos específicos de cada implantação. | | Compilação/execução | `MYSQL_VERSION`, `REDIS_VERSION`, `PHP_CLI_SERVER_WORKERS`, `VITE_APP_NAME`, `BCRYPT_ROUNDS` | Imagens do Docker Compose e comportamento de execução do framework. | +## Logs dos contêineres {#container-logs} + +Defina `LOG_CHANNEL=stderr` nos contêineres da API, dos workers e do agendador +para que `docker logs` ou `kubectl logs` colete os logs da aplicação. Defina-o +explicitamente nas versões existentes. Use `LOG_LEVEL` para escolher a gravidade +mínima. Para JSON com um registro por linha, adicione: + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +Reinicie os processos persistentes após alterar essas opções, pois a configuração +é armazenada em cache na inicialização. Um canal de arquivo escolhido +explicitamente precisa de armazenamento e coleta próprios; o Kubernetes não +coleta `storage/logs/laravel.log` automaticamente. `DW_LOG_FORMAT` não é uma opção compatível. + ## Notas de migração {#migration-notes} Ao migrar uma implantação antiga, altere primeiro para o nome público e deixe o nome antigo sem definição. Se ambos estiverem presentes, os operadores devem considerar o valor `DW_*` e remover o nome antigo. diff --git a/i18n/pt-BR/source-hashes.json b/i18n/pt-BR/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index ad300649452..886893bf6b8 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -336,12 +336,28 @@ workers, які виконують ті самі workflows. | Група | Змінні | Використання | | --- | --- | --- | | Застосунок | `APP_NAME`, `APP_ENV`, `APP_KEY`, `APP_DEBUG`, `APP_URL`, `APP_VERSION`, locale, timezone, налаштування maintenance і cipher | Ідентичність runtime Laravel-застосунку та поведінка старту. | -| Логування | `LOG_CHANNEL`, `LOG_LEVEL`, налаштування stack, daily, Slack та Papertrail | Напрямки логування Laravel та retention. | +| Логування | `LOG_CHANNEL`, `LOG_LEVEL`, `LOG_STDERR_FORMATTER`, налаштування stack, daily, Slack та Papertrail | Напрямки, формат і термін зберігання журналів Laravel. | | База даних | `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `DB_SOCKET`, `DB_URL`, налаштування charset, collation та foreign keys | SQL-сховище стану таблиць workflow, namespace, worker і projections. | | Redis/cache/queue | `REDIS_*`, `QUEUE_CONNECTION`, `QUEUE_FAILED_DRIVER`, `CACHE_STORE`, `CACHE_PREFIX`, `SESSION_*` | Queue workers, cache locks, long-poll signals і підтримка web/session runtime. | | Файлові системи/пошта/broadcasting | `FILESYSTEM_DISK`, `MAIL_*`, `BROADCAST_*`, `PUSHER_*`, `AWS_*` | Інтеграції фреймворку для особливостей конкретного розгортання. | | Build/runtime | `MYSQL_VERSION`, `REDIS_VERSION`, `PHP_CLI_SERVER_WORKERS`, `VITE_APP_NAME`, `BCRYPT_ROUNDS` | Docker Compose images та поведінка runtime фреймворку. | +## Журнали контейнерів {#container-logs} + +Задайте `LOG_CHANNEL=stderr` у контейнерах API, воркерів і планувальника, щоб +`docker logs` або `kubectl logs` збирали журнали застосунку. Для наявних випусків +задайте це явно. `LOG_LEVEL` визначає мінімальний рівень важливості. Для JSON +з одним записом у рядку також задайте: + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +Після змін перезапустіть постійні процеси, оскільки конфігурація кешується під час +запуску. Явно вибраний файловий канал потребує власного сховища та збору журналів; +Kubernetes не збирає `storage/logs/laravel.log` автоматично. +`DW_LOG_FORMAT` не є підтримуваним налаштуванням. + ## Примітки до міграції {#migration-notes} Під час міграції старого розгортання спочатку змініть публічну назву diff --git a/i18n/uk/source-hashes.json b/i18n/uk/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md index 479e601734c..a2aa709835a 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/polyglot/server-config-reference.md @@ -278,12 +278,26 @@ Server 镜像内置 `durable-workflow/workflow`,因此也提供包级 `DW_V2_* | 分组 | 变量 | 用途 | | --- | --- | --- | | 应用 | `APP_NAME`、`APP_ENV`、`APP_KEY`、`APP_DEBUG`、`APP_URL`、`APP_VERSION`、区域、时区、维护及加密设置 | Laravel 应用的运行时标识与启动行为。 | -| 日志 | `LOG_CHANNEL`、`LOG_LEVEL`、堆栈、每日、Slack 与 Papertrail 设置 | Laravel 日志目的地与保留。 | +| 日志 | `LOG_CHANNEL`、`LOG_LEVEL`、`LOG_STDERR_FORMATTER`、堆栈、每日、Slack 与 Papertrail 设置 | Laravel 日志输出位置、格式与保留。 | | 数据库 | `DB_CONNECTION`、`DB_HOST`、`DB_PORT`、`DB_DATABASE`、`DB_USERNAME`、`DB_PASSWORD`、`DB_SOCKET`、`DB_URL`、字符集、排序规则及外键设置 | 存储工作流、命名空间、Worker 及投影表的 SQL 状态库。 | | Redis、缓存与队列 | `REDIS_*`、`QUEUE_CONNECTION`、`QUEUE_FAILED_DRIVER`、`CACHE_STORE`、`CACHE_PREFIX`、`SESSION_*` | 队列 Worker、缓存锁、长轮询信号和 Web/会话运行时支持。 | | 文件系统、邮件与广播 | `FILESYSTEM_DISK`、`MAIL_*`、`BROADCAST_*`、`PUSHER_*`、`AWS_*` | 部署特有功能使用的框架集成。 | | 构建与运行时 | `MYSQL_VERSION`、`REDIS_VERSION`、`PHP_CLI_SERVER_WORKERS`、`VITE_APP_NAME`、`BCRYPT_ROUNDS` | Docker Compose 镜像及框架运行行为。 | +## 容器日志 {#container-logs} + +在 API、worker 和调度器容器中设置 `LOG_CHANNEL=stderr`,让 `docker logs` +或 `kubectl logs` 收集应用日志。已有发行版需显式设置。使用 `LOG_LEVEL` +选择最低严重级别。如需每行一条记录的 JSON,还应设置: + +```dotenv +LOG_STDERR_FORMATTER="Monolog\Formatter\JsonFormatter" +``` + +配置会在启动时缓存,因此修改后应重启常驻进程。显式选择文件日志通道时, +需要自行提供存储和收集机制;Kubernetes 不会自动收集 +`storage/logs/laravel.log`。`DW_LOG_FORMAT` 不是受支持的设置。 + ## 迁移说明 {#migration-notes} 迁移旧部署时,先改用公开名称,并将旧名称设为未设置。若两者同时存在,运维人员应以 `DW_*` 值为准,并移除旧名称。 diff --git a/i18n/zh-Hans/source-hashes.json b/i18n/zh-Hans/source-hashes.json index 62ae05b644c..2f1805a064d 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -86,7 +86,7 @@ "polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3", "polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0", "polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a", - "polyglot/server-config-reference.md": "3df7ca7618842dfefd25a0ec146eac8f272ea5a640ab0b1f1320752d7e875b33", + "polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7", "polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2", "polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171", "polyglot/service-operations.md": "a2ee46ac8d2e4f18aed4e3cb47a4f0b36f51ccc67f1e841efb99f0297391cf27",