Comment by johnisgood
Comment by johnisgood 2 days ago
This looks good. Any way to use date/time in RFC 3339 format without changing the source code?
Does this work with runit (Void Linux)?
Comment by johnisgood 2 days ago
This looks good. Any way to use date/time in RFC 3339 format without changing the source code?
Does this work with runit (Void Linux)?
Void Linux uses svlogtail for viewing logs.
It is a simple script: https://github.com/void-linux/socklog-void/blob/master/svlog...
I think everything is in /var/log/socklog/everything/current, so this could be considered united.
Before you add the timefmt, it may be better to add a configuration file if one does not already exist, but it seems like it does? You already have ~/.config/nerdlog/logstreams.yaml, so might as well have config.yaml?
For more about logging on Void: https://docs.voidlinux.org/config/services/logging.html
That's good news that we have /var/log/socklog/everything/current, but I'm also trying to figure the format. Is it like this? (sourced from chatgpt)
2025-04-21 12:34:56 myhostname myservice: Something happened
If so, then yeah it's totally doable to make this format supported.
Re: config.yaml, yeah I thought of that, but in the long term I rather wanted it to be nerdlogrc.lua, so a Lua script which nerdlog executes on startup. Similar to vim (or rather, more like neovim in this case since it's Lua). Certainly having config.yaml is easier to implement, but in the longer term it may make things more confusing if we also introduce the Lua scripting.
Sadly no. The format is (with examples):
2025-04-21T19:18:15.09577 user.notice: Apr 21 21:18:15 root: ACPI group/action undefined: jack/lineout / LINEOUT
2025-04-21T19:18:15.98845 daemon.debug: Apr 21 19:18:15 rtkit-daemon[1368]: Supervising 0 threads of 0 processes of 1 users.
And yes! That is even better for configuration!
Re: the date/time format, I was thinking about implementing support for an option like timefmt, so you'd be able to do :set timefmt=2006-01-02T15:04:05Z07:00 , but postponed for now.
That's not hard to implement, however to make it persistent requires implementing some config / scriptability, which is a whole other thing and requires more thought.
Re: runit, I never tested it, but after looking around briefly, it sounds like there is no unified log file, and not even unified log format? I mean it's possible to make it work, treating every log file as a separate logstream, but I've no idea what these logs look like and whether supporting the formats would be easy.