hvisage / metalog

metalog is a syslog replacement that allows regular expresion matching
GNU General Public License v2.0
35 stars 10 forks source link

No timestamp in command only block #5

Closed pvcdx closed 5 years ago

pvcdx commented 5 years ago

Hello,

it seems that metalog doesn't send timestamp to a log command if only the command is specified and not an logfile.

Example partial config:

console logging : facility = "*" command = "/usr/local/sbin/consolelog.sh"

The consolelog script will receive first argument empty. On the other hand, for this config:

console logging : facility = "*" command = "/usr/local/sbin/consolelog.sh" logdir = "/var/log/consolelog"

Metalog calls tthe consolelog script with first argument filled out.

Could You please fix this minor bug?

Thank You.

m-kress commented 5 years ago

Fixing this seems to require quite some work. As a workaround you could try to use logdir = "NONE" additionally to the command.

pvcdx commented 5 years ago

Thank You, the workaround solves this issue.