Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
syslog on systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leonchik1976
Apprentice
Apprentice


Joined: 24 Jan 2010
Posts: 176

PostPosted: Tue Dec 31, 2013 4:37 am    Post subject: syslog on systemd Reply with quote

i've just finished installing a fresh installation of system with systemd, but syslog.service failed to start (and also /var/log/messages is missing).
It says "Failed to issue method call: Unit syslog.service failed to load: No such file or directory."
I can't figure out how to find which files are missing.
Any ideas?
Back to top
View user's profile Send private message
Kompi
Apprentice
Apprentice


Joined: 05 Oct 2002
Posts: 252
Location: Germany

PostPosted: Tue Dec 31, 2013 9:02 am    Post subject: Reply with quote

Systemd has its own built in logger called the journal. The journal does not use the /var/log/* files, but stores everything in a binary log that can be read with:
Code:
journalctl

See "man journalctl" for more usage details.

You can however use a default logger on top of that. If you want the good old /var/log/messages and friends, you need to emerge a syslog of your choice (sysklogd, syslog-ng, rsyslog, metalog etc). If you emerge one of those, you can enable them to be used as the sys logger. For example, say you emerge rsyslog. If you enable rsyslog with:
Code:
systemctl enable rsyslog.service

This will symlink the syslog.service to the rsyslog.service unit. That is, it will be installed as an alias for syslog.service. (this is done in the rsyslog.service file in section [Install] with the line: Alias=syslog.service).

So, in short: It fails, because systemd tries to start syslog.service even though you do not have any sys logger enabled. If you want a logger, emerge one and enable it with "systemd enable". If you do not need a logger on top of the journal, you can just disable the syslog.service by:
Code:
systemctl disable syslog.service

It might still be pulled in as a dependency by another package. If you still get the failed message try masking it:
Code:
systemctl mask syslog.service
Back to top
View user's profile Send private message
leonchik1976
Apprentice
Apprentice


Joined: 24 Jan 2010
Posts: 176

PostPosted: Tue Dec 31, 2013 9:17 am    Post subject: Reply with quote

thanks! when i posted a previous question, i installed syslog-ng, but it failed to start, after a couple of restart - now it works. thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum