Giter Club home page Giter Club logo

socklog-void's People

Contributors

leahneukirchen avatar polargo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

socklog-void's Issues

svlogtail: `cat` error message when no `*.[us]` logs exist

On a fresh void install I just got an error message when using svlogtail on a service that does not yet have rotated logs (*.[us]):

[root@rootfs /]# svlogtail xbps
cat: '/var/log/socklog/xbps/*.[us]': No such file or directory

After that the current log is displayed.

Maybe there is an elegant way in sh to check whether a glob expands? Then that could be used as a guard for https://github.com/void-linux/socklog-void/blob/master/svlogtail#L23?

Add log rotation?

Hi,

I'm new to void, and before when I was using systemd logging I would run logrotate to keep log files under control. I see that socklog/svlogd has built-in rotation support, which is cool, and I wonder if it would be useful to add some rotation limits to these default profiles. Alternatively, I can edit the socklog .conf files, but will that be overwritten by socklog updates?

Cheers

svlogtail: Add `-f` option for following the log like in `tail -f`

Logs often have many lines, and then it's often useful to use a pager to display them, because 1) one is brought directly to the beginning of the log and does not have to search for it, and 2) one can search the file interactively using a pager like less.

Maybe I'm missing something, but right now I have to first pipe the output to less, then when I go to the bottom of the content the pager "loses input": I have to Ctrl-C the tail command, then I can use the pager as usual.

I had the idea of implementing a -f flag just like in the regular tail command. Benefits:

  1. More coherent with the behavior of tail (which many users are familiar with).
  2. One could svlogtail | less like usual without the dangling tail at the end that needs be Ctrl-C'.

If there is interest I think I could implement this.

Runit service fails

Fails with chpst: fatal: unable to run: nanoklogd: access denied

Trying to run it manually with strace chpst -u nobody:nogroup /usr/bin/nanoklogd I get the following strace

execve("/usr/bin/chpst", ["chpst", "-u", "nobody:nogroup", "/usr/bin/nanoklogd"], 0x7ffcfefb40f8 /* 18 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x7fef8a03bd88) = 0
set_tid_address(0x7fef8a03c204)         = 4373
mprotect(0x7fef8a038000, 4096, PROT_READ) = 0
mprotect(0x55928bc82000, 4096, PROT_READ) = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
read(3, "root:x:0:0:root:/root:/bin/sh\nno"..., 1024) = 704
lseek(3, -620, SEEK_CUR)                = 84
close(3)                                = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
read(3, "root:x:0:\nbin:x:1:\nsys:x:2:\nkmem"..., 1024) = 569
lseek(3, -231, SEEK_CUR)                = 338
close(3)                                = 0
setgroups(1, [99])                      = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0
setgid(99)                              = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0
setuid(99)                              = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
execve("/usr/bin/nanoklogd", ["/usr/bin/nanoklogd"], 0x55928bc839b0 /* 18 vars */) = -1 EACCES (Permission denied)
write(2, "chpst: fatal: unable to run: /us"..., 63chpst: fatal: unable to run: /usr/bin/nanoklogd: access denied
) = 63
exit_group(111)                         = ?
+++ exited with 111 +++

svlogtail: show only from current boot

Would it be possible to add an option to svlogtail to only show logs from current boot?
I was trying to replicate the behaviour of journalctl -p 3 -b, right now I can do svlogtail errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.