Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow doveadm to log into dovecot.conf configured facility (like syslog) #156

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/man/doveadm.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
doveadm \- Dovecot\(aqs administration utility
.\"------------------------------------------------------------------------
.SH SYNOPSIS
.BR doveadm " [" \-Dv "] [" \-f
.BR doveadm " [" \-Dsv "] [" \-f
.IR formatter ]
.IR command " [" command_options "] [" command_arguments ]
.\"------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions doc/man/global-options-formatter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Global
.B \-D
Enables verbosity and debug messages.
.TP
.B \-s
Don't log to stderr and use log destination from configuration instead.
.TP
.BI \-f\ formatter
Specifies the
.I formatter
Expand Down
7 changes: 5 additions & 2 deletions src/doveadm/doveadm.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ usage_to(FILE *out, const char *prefix)
const struct doveadm_cmd *cmd;
string_t *str = t_str_new(1024);

fprintf(out, "usage: doveadm [-Dv] [-f <formatter>] ");
fprintf(out, "usage: doveadm [-Dsv] [-f <formatter>] ");
if (*prefix != '\0')
fprintf(out, "%s ", prefix);
fprintf(out, "<command> [<args>]\n");
Expand Down Expand Up @@ -317,7 +317,7 @@ int main(int argc, char *argv[])
/* "+" is GNU extension to stop at the first non-option.
others just accept -+ option. */
master_service = master_service_init("doveadm", service_flags,
&argc, &argv, "+Df:hv");
&argc, &argv, "+Df:hsv");
while ((c = master_getopt(master_service)) > 0) {
switch (c) {
case 'D':
Expand All @@ -330,6 +330,9 @@ int main(int argc, char *argv[])
case 'h':
doveadm_print_hide_titles = TRUE;
break;
case 's':
service_flags |= MASTER_SERVICE_FLAG_DONT_LOG_TO_STDERR;
break;
case 'v':
doveadm_verbose = TRUE;
break;
Expand Down