What does the minus sign at the beginning of a log file directory mean?

I just started to learn linux with Ubuntu 18.04. When I was reading the config file for rsyslog: /etc/rsyslog.d/50-default.conf , I found that some of the log file directories are having minus signs at their beginning, like the one I pasted below.

mail.*                          -/var/log/mail.log 

Only auth and cron do not contain any minus sign among their default log file directories. Does this minus sign mean anything special? Thanks!


Solution 1:

From man rsyslog.conf

To selectively disable syncing for certain files, you may prefix the file path with a minus sign ("-").

The entire paragraph reads:

By default, files are not synced after each write. To enable syncing of log files globally, use either the "$ActionFileEnableSync" directive or the "sync" parameter to omfile. Enabling this option degrades performance and it is advised not to enable syncing unless you know what you are doing. To selectively disable syncing for certain files, you may prefix the file path with a minus sign ("-").

In other words, the '-' retains do-not-sync in case you change the default behavior (Advice: Don't).

This particular question is specific to rsyslog config files. '-' before a normal path anywhere else is usually a syntax error.