Commit Graph

8 Commits

Author SHA1 Message Date
Lorenz Leutgeb 0c513e981f systemd: Support Credentials
Add `mod credential` with `fn path` which implements a simple lookup of
systemd credentials. See <https://systemd.io/CREDENTIALS/>
2025-10-09 10:03:21 +01:00
Lorenz Leutgeb 5cd016b587 radicle-systemd: Guard `mod listen` for Unix
This crate does not build on Windows, because there is a Unix-only `use`
in `mod listen`. To get the crate to build, guard the module
appropriately.
2025-10-02 15:46:56 +01:00
Lorenz Leutgeb 474b97950b
node/log: Define syslog identifier
The argument passed to `fn logger` would only be used as a fallback.
Make it required to pass an identifier, as this is a good practice.
2025-10-01 16:46:46 +02:00
Lorenz Leutgeb e563117397 node: Refactor logging initialization
Logging initialization was infallible previously, i.e., a logger would
always have to be chosen, falling back to our own logger
implementation in case of failure with setting up journald submission.

This lead to complexity like attempting to log errors from parsing
arguments, as there is a circular dependency.

Change this to make logging initialization fallible. If it fails, exit
non-zero instead of falling back to another logger. This makes the
initialization code slightly simpler.

At the same time, make choosing the logger possible via the command
line and deprecate `--log`.

Note that we still default to journald if detected.
2025-09-23 16:33:50 +02:00
Yorgos Saslis 9793b4e7b6 systemd: Require Linux for journal module
The dependency `systemd-journal-logger` does not build on macOS, and
there are no tests for other Unixes. Also, systemd is most common on
Linux.

To avoid compilation errors on non-Linux platforms, only depend on the
crate when building on Linux.

Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
2025-09-19 15:39:53 +02:00
Lorenz Leutgeb c7f3c47f9a systemd: Add module for logging to the journal 2025-08-07 08:30:59 +01:00
Lorenz Leutgeb 2776e003dc systemd: Move socket activation to module 2025-08-07 08:30:59 +01:00
Lorenz Leutgeb 5bc2dc677b repo: Move workspace crates into `crates` subdirectory
This keeps the top level of the repo cleaner, e.g.
<https://github.com/radicle-dev/heartwood> scrolls less and
<https://app.radicle.xyz/nodes/rosa.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/>
might show more files at the top level.

This way we also don't have to explicitly name all crates in
`Cargo.toml`.
2025-06-09 15:09:21 +02:00