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

Allow setting log namespaces for systemd services generated by Arion on NixOS #244

Open
nikp123 opened this issue May 15, 2024 · 0 comments

Comments

@nikp123
Copy link

nikp123 commented May 15, 2024

The idea is pretty simple, in the generated arion-${containerName}.service file, set an additional option in the [Service] section called LogNamespace=${containerName}.

The rationale: This is used in case we want to limit the size of the journal but don't want it to be globally smaller for services that output logs rarely. An example would be caddy which outputs logs for EVERY single access attempt, meanwhile something like cloudflare-dyndns would do it rarely. The result is that I lose useful dyndns logs because caddy eats up most of that journal log size.

IDEALLY, we would be able to set log sizes per unit, but that's currently a TODO in the main systemd repository. See: systemd/systemd#9519

By setting a log namespace we're able to isolate logs more clearly and set log settings per namespace, thus effectively achieving the same thing.

Yes, this is indeed a workaround on a SystemD issue, but since there's no activity on their side, I think it's valid to ask for this feature here. Apologies in advance if this seems inappropriate.

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

1 participant