1

I configured nginx to log in this format

log_format lalala '$remote_addr - $remote_user ';
access_log syslog:server=unix:/dev/log lalala;

However, every line starts with:

testserver nginx: 

Despite it being absent from my log format.

This means that coupled with journald, I have my hostname and "nginx" twice every log line.

Is there a way to remove that thing? I haven't found a way.

LtWorf
  • 123
  • 8

1 Answers1

1

I needed to add nohostname in the options:

access_log syslog:server=unix:/dev/log,nohostname lalala;

http://nginx.org/en/docs/syslog.html

LtWorf
  • 123
  • 8