Thanks to visit codestin.com
Credit goes to github.com

Skip to content

log-counter static linking via journalctl CLI#1

Open
zees-dev wants to merge 5 commits intomasterfrom
feat/static-link-journalctl-support
Open

log-counter static linking via journalctl CLI#1
zees-dev wants to merge 5 commits intomasterfrom
feat/static-link-journalctl-support

Conversation

@zees-dev
Copy link
Owner

@zees-dev zees-dev commented Sep 3, 2024

Background

Currently building log-counter requires CGO_ENABLED since there is a dependency on github.com/coreos/go-systemd/v22/sdjournal which uses C-bindings to read system journal.
This essentially produces a dynamically linked binary which is not portable across different versions of the same OS.

This is especially an issue if you want to build a binary which is portable across different versions of the same OS.

Static linking

This PR adds support for static-linking to the log-counter - such that the log-counter calls out to the journalctl binary instead (which must be available in the host system) to read system journal entries.

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.

1 participant