roadrunner icon indicating copy to clipboard operation
roadrunner copied to clipboard

[💡 FEATURE REQUEST]: Ability to change logs format

Open butschster opened this issue 2 years ago • 4 comments

Plugin

Logger

I have an idea!

Hi @rustatian,

Every time when I start RoadRunner I see in console something like this

2022-11-24T21:39:48.318+0400    ERROR   service         wait    {"error": "signal: interrupt"}

It would be great to change logs format, like this

logger:
     format: "H:i:s  %level_name%  %message% %context%"

butschster avatar Nov 24 '22 17:11 butschster

Add please the ability to specify the date and time to the name of the log file

Result log file name - rr-2023011017.log or add an option

output: ${LOG_PATH}/rr-$(shell date +"%y%m%d%H").log

s1lver avatar Jan 10 '23 14:01 s1lver

Hey @s1lver 👋🏻

You can go ahead and attend tomorrow's RR planning stream (via chat); we can talk about that.

rustatian avatar Jan 10 '23 14:01 rustatian

Add please the ability to specify the date and time to the name of the log file

Result log file name - rr-2023011017.log or add an option

output: ${LOG_PATH}/rr-$(shell date +"%y%m%d%H").log

RR configuration supports the env variables, so you may specify date and time like this:

export FOO=$(shell date +"%y%m%d%H") LOG_PATH=$(path) ./rr serve -c .rr.yaml

.rr.yaml:

output: ${LOG_PATH}/rr-{FOO}.log

rustatian avatar Mar 29 '23 22:03 rustatian

+1 we need to change log format to be always json

dmitryuk avatar Feb 02 '24 03:02 dmitryuk