-
-
Notifications
You must be signed in to change notification settings - Fork 421
Description
No duplicates 🥲.
- I have searched for a similar issue in our bug tracker and didn't find any solutions.
What happened?
When using the Temporal plugin, RoadRunner still prefixes every log line with a timestamp, level, and channel — even when encoding: json and mode: raw are configured. This breaks JSON parsing in log processors like Elasticsearch, where the prefixed metadata prevents proper decoding of Laravel’s JSON log content.
As a result, log messages appear as raw strings instead of structured JSON objects, making it impossible to extract or filter context fields correctly.
"2025-10-24T08:26:24+0000\tINFO\tserver \t{\"message\":\"PDOException: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation \\\"events\\\" does not exist\\nLINE 1: insert into \\\"events\\\" (\\\"audit_event_id\\\", \\\"env_name\\\", \\\"audit_s...\\n ^ in /var/www/gms/current/vendor/laravel/framework/src/Illuminate/Database/Connection.php:501\\nStack trace:\\n#0 Illuminate\\\\Foundation\\\\Console\\\\Kernel->handle()\\n#42 {main}\",\"context\":{},\"level\":400,\"level_name\":\"ERROR\",\"channel\":\"gms_audit_log\",\"datetime\":\"2025-10-24T08:26:24.853203+00:00\",\"extra\":{}}\n"
Version (rr --version)
- RoadRunner version: v2025.1.1
- Temporal plugin: latest
- Temporal PHP SDK: 2.14.1
How to reproduce the issue?
- Configure
.rr.yaml:
logs:
encoding: json
level: "${TEMPORAL_LOG_LEVEL:-debug}"
mode: "${TEMPORAL_LOG_MODE:-production}"
channels:
temporal:
level: info
mode: raw
rpc.level: error # Only RPC errors
server.level: info # Worker lifecycle
app.level: info # Laravel logs
lock.level: warn # Logs RoadRunner lock events- Run a Temporal PHP worker (using temporalio/roadrunner-temporal).
- Trigger a workflow that calls Workflow::getLogger()->info().
Relevant log output
2025-10-24T10:35:51+0000 INFO server [2025-10-24 10:35:51] info: Workflow ===> Workflow started {"task_queue":"default","activity":"sendNotification","payload":{"message_key":"MESSAGE - TEST","source":"pev_vrednosti","title_key":"TITLE - TEST","type":"error"}}
2025-10-24T10:35:51+0000 INFO server {"message":"LOG ===> Workflow started","context":{"activity":"sendNotification","payload":{"message_key":"MESSAGE - TEST","source":"pev_vrednosti","title_key":"TITLE - TEST","type":"error"}},"level":200,"level_name":"INFO","channel":"laravel","datetime":"2025-10-24T10:35:51.528914+00:00","extra":{}}
2025-10-24T10:35:51+0000 INFO server [2025-10-24 10:35:51] info: Bridge workflow started {"task_queue":"default","activity":"sendNotification","startedAt":"2025-10-24 10:35:51"}
2025-10-24T10:35:51+0000 INFO server {"message":"Bridge workflow started","context":{"activity":"sendNotification","startedAt":"2025-10-24 10:35:51"},"level":200,"level_name":"INFO","channel":"laravel","datetime":"2025-10-24T10:35:51.529886+00:00","extra":{}}