0

In my nginx config, I have several servers block. Each block has its own access/error log in different path.

server {
    server_name 1
    access_log /path1/access_log  <-- use UTC
}

server {
    server_name 2
    access_log /path2/access_log  <-- use Asia/Singapore
}

Is it possible to use different timezone settings for these two logs?

The intention of this is I have multiple other sources of data that I need to align with access log

Xuphey
  • 1
  • 1

1 Answers1

0

The access_log directive takes an optional log_format directive, that governs the information recorded in that specific log file.

The default format is combined but AFAIK the log_format directive allows you to define your own with a different timestamp.

It might be easier to do some post processing though in the system where you will correlating the different datasources though.

HBruijn
  • 72,524
  • 21
  • 127
  • 192