ws4sqlite icon indicating copy to clipboard operation
ws4sqlite copied to clipboard

Request and error logging

Open blaix opened this issue 10 months ago • 2 comments

I think it would be helpful to have access and error logging in the server.

blaix avatar Mar 08 '25 10:03 blaix

Good evening. I agree. how do you think it could be?

My proposal is to keep everything in stdout/stderr, so that it's more "docker friendly"; at work, I appreciate structured logs, like a JSON row for each event

{ "type": "ACCESS", "level": "INFO", "message": "user 'alice' was authenticated successfully" }
{ "type": "ACCESS", "level": "WARNING", "message": "attempt failed to authenticate user 'eva'" }
{ "type": "OPERATION", "level": "ERROR", "message": "request failed", "err": "syntax error!" }

What do you think?

proofrock avatar Mar 08 '25 19:03 proofrock

I also prefer stdio for logging, and structured logs, so this sounds great!

blaix avatar Mar 12 '25 16:03 blaix