Issue 9240 - Can't log to stdout/stderr
Summary: Can't log to stdout/stderr
Status: VERIFIED INVALID
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-23 12:06 UTC by hadmut@danisch.de
Modified: 2020-04-28 18:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hadmut@danisch.de 2020-04-23 12:06:24 UTC
Hi,

slapd can send its logs and messages to syslog, which is nice and good in common Unix/Linux environments, but I didn't see any way to have the logs sent to stdout/stderr instead of syslog. 

When run in a docker/kubernetes container, which is a typical use nowadays, it should be run as a single process, and not require a separate syslog process just to write some logs to a file. There are dirty workarounds, but if run cleanly, it should be a standalone process. 

Therefore, it would be nice if slap had a container mode, where 

- it doesn't fork (currently available only through debugging mode)
- sends logging to stdout/stderr instead of syslog

regards
Comment 1 Ryan Tandy 2020-04-23 16:21:19 UTC
This would be appreciated by users of other service supervisors too, such as systemd, runit, s6, etc. Running in foreground with logging to stderr (not stdout, please) is becoming a more and more typical setup in general, not only for debugging.
Comment 2 Howard Chu 2020-04-23 17:47:40 UTC
(In reply to Ryan Tandy from comment #1)
> This would be appreciated by users of other service supervisors too, such as
> systemd, runit, s6, etc. Running in foreground with logging to stderr (not
> stdout, please) is becoming a more and more typical setup in general, not
> only for debugging.

That's already what happens when you run with -d. I see nothing to change here.
Closing this ITS.