5 ms·
> Creating unit files is trivial [...] Unless you expect anything but most trivial use cases, e.g. some user-owned directory under /var/run (/run). Then you ne
by dozzie 9y ago
> Creating unit files is trivial [...]
Unless you expect anything but most trivial use cases, e.g. some user-owned
directory under /var/run (/run). Then you need to wild-guess at what
combination of options needs to be set. Good thing that those options are at
least described in docs.
> Seeing the logs of every service is also trivial since it's standardized. No more spelunking through /var/log or some random location.
syslog already was standard. We gained nothing really from journald.
- oblio 9y agoQuick, how do I see the logs for the currently running services from the random OSS project foo and the random commercial project bar? What do I type in my terminal?
- dozzie 9y agoSo? How do you tell between commercial and OSS projects in journald? And about that "quick" part, I'd rather have a way to do that that's either easy to recall or easy to re-develop. journald's magical incantations that don't compose to any consistent language (unlike Vim or Emacs keybindings, for instance) nor are the same as in virtually any other software are not convenient by any stretch. I have my memory cluttered enough by half a dozen of different languages I use, their runtimes, runtimes of languages I don't write in but need for some software I run, twice that of DSLs and specialized languages, options and functions of dozens of services, wire formats of network protocols, management procedures of various Linux subsystems, and so on. I don't need an option to a command to tell me what you ask, I can work my way through grep/sed/awk faster than you read man page, thank you very much.
- lclarkmichalek 9y agoI feel like journalctl -u foo is easier to type than that rant.
- oblio 9y agoThose were just random examples to prove a point (daemons/services can have very varied origins). The real question is: > I have two service from totally different origins. What do I type in my terminal to see their logs, with syslog or other widely used init systems currently in use, except for systemd? So? :)
- fiddlerwoaroof 9y ago`less /var/log/<service>.log` or `ag <service> /var/log` or something similar usually works pretty well. I’m not sure why I need a command line utility to do something that the filesystem+standard Unix utilities does just fine. The whole point of Unix is to compose general purpose utilities to get the job done rather than to create a special tool for each task.
- oblio 9y agoCause they don’t. Every service puts stuff wherever it wants, especially poorly written services. At least with systemd services do the right thing, by default. At some point Unix will learn that in the wild opt-out is better than opt-in. When you make doing the right thing easy, everyone will do it. When you don’t, everyone does what they want, which is generally bad. The fact that we have to ag or grep -R is a kludge. There’s NO technical reason the folder structure shouldn’t be flexible but standardized and also NO reason why there shouldn’t be some system scaffolding to help with that. Call it systemd or whateverd, it should be there.
- fiddlerwoaroof 9y agoBut syslog already solved this problem (as others have said): you pipe all your output to syslog (even via TCP/UDP) and then syslog determines where the output should go via the entries in syslog.conf. And you can even write a simple utility that wraps an arbitrary executable and redirects its stdout/stderr to syslog as well, solving the problem for 90% of the applications that don't have builtin syslog support.
- 9y ago
- JdeBP 9y agoNot everyone is the same. Some people have learned such stuff. Some people need cheatsheets. * http://jdebp.eu./Softwares/nosh/guide/logging-cheatsheet.html http://jdebp.eu./Softwares/nosh/guide/logging-cheatsheet.htm...
- vbernat 9y agoMany services don't log to syslog. For example, on Debian derivatives, /etc/init.d/networking was logging to the console only. Good luck to get the output once the system has booted. With systemd/journald, you get the info.
- dozzie 9y ago> For example, on Debian derivatives, /etc/init.d/networking was logging to the console only. Good luck to get the output once the system has booted. Well, this is my luck: /var/log/boot, written by bootlogd, which is installed from distribution packages on Debian. So? What of it?