Comment by johnisgood

Comment by johnisgood 2 days ago

8 replies

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

dimonomid 2 days ago

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.

  • johnisgood 2 days ago

    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!
    • johnisgood 10 hours ago

      Maybe the format could be customizable per log file, too.

      • dimonomid 9 hours ago

        I don't think there's anything wrong with this format, it looks good. The most important thing for nerdlog is that all components of the timestamp must be at the fixed offsets from the beginning of each line. So I believe it can be implemented, I can look at it on the weekend. Feel free to create an issue on Github (I won't be able to test it for real, so would need your help with that)