Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Does TinyLogger support standard syslog format so normal server web logging tools understand the output? #46

Open
macta opened this issue Apr 16, 2024 · 2 comments

Comments

@macta
Copy link

macta commented Apr 16, 2024

I don't see any mention of TinyLogger conforming to the normal linux syslog format - https://www.atatus.com/blog/syslog-formats/ is this something we have to configure ourselves?

It seems strange, as the whole point of formalising logging would seem to be so that Smalltalk apps play well with others on a server?

@jecisc
Copy link
Owner

jecisc commented Apr 16, 2024

Hi,

It is possible to customize the timestamp format so this should be possible.
For now, it's not integrated in TinyLogger because nobody asked it :)

@macta
Copy link
Author

macta commented Apr 17, 2024

Actually I've realised that to better integrate with web based server tools (where logging is helpful if you have a headless app running), its not syslog fmt per sei that you want, but it seems that structured json logging is what they all recognize. So really I think its a case of creating a json logger option that outputs things like this:

Transcript cr; show: '{"level":"INFO","message":"Some app output message","process":"MyApp","time":"'; show: DateAndTime now; show: '"}'; cr.

I think that should be easily doable - but I've not got time at the moment and have hacked my transcript logging (and may come back to this in the future). Thought this might be useful for anyone else looking.

Doing something like this results in searchable log format for tools like Betterstack e.g.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants