I try to setup hashicorp consul(as a windows service) to log data to file. The doc says to set the log_level in the config file but nothing about where the logfiles will end up on a Windows computer? There is a consul monitor but I need it to log to file.
{
"data_dir": "data",
"log_level": "INFO",
"bootstrap_expect": 1,
"server": true,
"bind_addr": "0.0.0.0",
"ui": true,
"datacenter": "dc1",
"addresses": {
"http": "0.0.0.0"
},
"ports": {
"http": 8518,
"dns": -1,
"https": -1,
"rpc": 8218,
"serf_lan": 8318,
"serf_wan": 8418,
"server": 8618
}
}
In this case I need to log when the consul goes on/off line and what services that the consul knows about and of course errors/warnings.
How do I log to file with hashicorp consul?
BestRegards
This is not possible, you have to run the service from the command prompt and then redirect STDOUT to a file. It's not the best solution but its the only way I've found.