Skip to content

Simplify LNT's logging story#169

Merged
ldionne merged 2 commits intollvm:mainfrom
ldionne:review/simplify-logging
Feb 6, 2026
Merged

Simplify LNT's logging story#169
ldionne merged 2 commits intollvm:mainfrom
ldionne:review/simplify-logging

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Feb 6, 2026

Before this patch, LNT had a rather complicated determination of where to store logs, especially given the fact that it is run under various layers (gunicorn, behind nginx, and docker). It would end up using a mixture of stderr logging and logging to lnt.log, which was rather confusing.

This patch changes the webserver to always log only to stderr, which is a lot simpler and is the de-facto standard when running inside a Docker container. This makes it easier to retrieve logs by using the commands built into Docker, and it simplifies the code.

When running outside of a Docker container, this is also a reasonable approach since we can redirect stderr as desired, for example using a utility like rotatelogs.

Finally, this patch removes the /log API endpoint, which is arguably a hack and also a huge potential for leaking sensitive data.

Fixes #137

Before this patch, LNT had a rather complicated determination of
where to store logs, especially given the fact that it is run under
various layers (gunicorn, behind nginx, and docker). It would end up
using a mixture of stderr logging and logging to lnt.log, which was
rather confusing.

This patch changes the webserver to always log only to stderr, which
is a lot simpler and is the de-facto standard when running inside a
Docker container. This makes it easier to retrieve logs by using the
commands built into Docker, and it simplifies the code.

When running outside of a Docker container, this is also a reasonable
approach since we can redirect stderr as desired, for example using
a utility like `rotatelogs`.

Finally, this patch removes the `/log` API endpoint, which is arguably
a hack and also a huge potential for leaking sensitive data.

Fixes llvm#137
@ldionne ldionne merged commit 56a3c89 into llvm:main Feb 6, 2026
15 checks passed
@ldionne ldionne deleted the review/simplify-logging branch February 6, 2026 00:11
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

Successfully merging this pull request may close these issues.

Logs get logged to both /var/log/lnt/lnt.log and /var/lib/lnt/instance/lnt.log

1 participant

Comments