logs and log formatting #1190
Replies: 2 comments
-
the log4rs package works like a charm... consider using that you can configure the logs in a yaml file |
Beta Was this translation helpful? Give feedback.
-
Logs always go to stdout. It's fairly trivial to re-direct to a file and most modern applications just log to stdout. If your output destination is not a tty, then the router produces JSON logs. From there, it's simple to use Would it be helpful to add some Also: see #694. |
Beta Was this translation helpful? Give feedback.
-
Logs should be able to routed to a file, not simply stdout...
is there a way to control the output patterns on the log?
This type of log formatting is really untenable:
INFO request{method=POST uri=/ version=HTTP/1.1 otel.kind=server otel.status_code=}:router{query="query Query {\n ping\n}" operation_name="Query" client_name="" client_version="" otel.kind=internal}:execution{otel.kind=internal}:fetch{otel.kind=internal}:subgraph{name="favorite-dgs" otel.kind=internal}: router::plugins::hello_world:
dumping the whole request, each time you add a simple output statement.. the whole request is dumped. When you have large queries, the logs just fill with garbage...
Beta Was this translation helpful? Give feedback.
All reactions