While that prometheus exporter was initially enabled by default, it looks like there's been a change of plan, resulting in some inconsistencies in the doc.
The `--no-prometheus` option was replaced by a `--prometheus` one -- according to https://github.com/wolmi/coturn/blob/master/src/apps/relay/mainrelay.c#L540
This adds the `--new-log-timestamp` and `--new-timestamp-format <value>` options
to the `turnserver` program.
Setting `--new-log-timestamp` on the command line, or `new-log-timestamp` in the
configuration file, will cause all logs to be written with an ISI-8601 timestamp
(`YYYY-MM-DDTHH:MM:SSZZZZZ` with `T` being literal and `ZZZZZ` being `+` or `-`
and the hour and minute offset from GMT for the local timezone). This replaces
the 'number of seconds since daemon was started' format.
Setting the `--new-timestamp-format <format>` option with a given format, or
`new-log-timestamp=<format>` in the configuration file, will use this instead
of the standard timestamp format. Timestamp format strings up to 48 characters
can be accommodated; more will be truncated. This will only be used when the
`--new-log-timestamp` option (above) is set.
Thanks to Hendrik Huels <hendrik.huels@outlook.de> for the idea and some of the
code for setting the log timestamp string.
Signed-off-by: Paul Wayper <paulway@mabula.net>
The function `turn_log_func_default` calls the function `vrtpprintf` to print to syslog
or the log file. The latter does exactly the same string formatting as the former, so
here we merge the two functions into one to do the string formatting once. This also
makes sure that the log line is consistent on all outputs.
Signed-off-by: Paul Wayper <paulway@mabula.net>
This provides the 'use_new_timestamp_log_format' variable in `ns_turn_utils.h`. By
default it is set to 0 and the old 'seconds since daemon was started' timestamp will
be emitted. However, if it is set to 1 or any 'true' number the new date and time
timestamp format will be used instead.
This has also resulted in a small clean-up of some of the string length handling.
Signed-off-by: Paul Wayper <paulway@mabula.net>