Bug 737135

Summary: Default logging setting is really obnoxious, makes debugging really really hard
Product: [Fedora] Fedora Reporter: Robin Powell <rlpowell>
Component: systemdAssignee: Lennart Poettering <lpoetter>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: harald, johannbg, kay, lpoetter, metherid, mschmidt, notting, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-21 18:06:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Powell 2011-09-09 17:46:56 UTC
(I looked for a similar ticket and couldn't find it; apologies for duplication)

I'm having huge amounts of trouble debugging any problems that I have with init scripts with systemd on Fedora 15.  I hope very much that this is a simple user error/lack of understanding on my part.

As far as I can tell, standard output and standard error from sysv init scripts, or the things they call, or most of the systemd scripts themselves, is simply thrown out; the default for StandardError= and StandardOutput= seems to be "toss out", or something.  At least, it isn't going to anywhere *I* can find.

Changing the default lines in /etc/systemd/system.conf and doing a daemon-reexc doesn't seem to change this behaviour.  Worse still, changing the LogLevel/LogTarget there doesn't seem to do anything either, so systemd doesn't even say what it thinks it's doing (unless I reboot, I guess/hope).

So, no error output if the daemon itself doesn't know to send error output to syslog.

Normally when I can't find logs for something, I just strace it, but that doesn't work because systemctl uses dbus to kick off systemd stuff.

This leaves me with no way to debug an init script (which is fun because I'm running SELinux with unconfined off, so this comes up A Lot).  I can debug the *daemon*, but sometimes the init script breaks the daemon in ways that don't happen when I run it directly myself.

I happen to know about SYSTEMCTL_SKIP_REDIRECT because a friend mentioned it, and that sometimes helps, but that's not documented *anywhere* as far as I can tell; even googling for that name directly finds no discussion of it.

So.  Not sure what I'm asking for here really, but I wanted to let you all know of my difficulties so maybe something could be done.

-Robin

Comment 1 Bill Nottingham 2011-09-09 17:51:01 UTC
This is fixed in Fedora 16 - all output is redirected to syslog. Unfortunately, there are some lower-level infrastructure fixes that needed done before we could do that.

Comment 2 Lennart Poettering 2011-09-21 18:06:44 UTC
Closing as nextrelease, since this is fixed with F16.