High precision timestamp in syslog

Ubuntu MATE uses high precision timestamp in /var/log/syslog, eg. (seconds, milliseconds)

2026-07-07T12:48:05.986990-07:00 um24 dbus-daemon[988]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

If you dont need high precision, you can add this line in /etc/rsyslog.conf under the GLOBAL DIRECTIVES

# To enable high precision timestamps, comment out the following line.
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

restart rsyslog with sudo systemctl restart rsyslog.service

new format shows as: hour:min:secs

Jul 7 12:54:37 um24 systemd[1]: Started rsyslog.service - System Logging Service.

If you dont like it, comment out that line and restart rsylog again and your syslog is back to its original setting. It might be useful to someone.

6 Likes

Pavlos, that is very interesting!

For me, my UM 22.04.5 LTS file contains that pair of lines by default.

Are you indicating by your post that newer versions have changed the default setting to high-precision?

Or is the high-precision only a default setting when installing Ubuntu Server?

3 Likes

I tested it on um24, VERSION=“24.04.4 LTS (Noble Numbat)”, it did not have those lines.

By default I had high precision timestamp but wanted to compare syslogs from diff systems and wanted to have the same timestamp (hh:mm:ss)

4 Likes

Thank you, Pavlos. I guess the change in default setting occured somewhere between those two releases. :slight_smile:

3 Likes

It is good to know which directive to use if you want high precision or basic timestamp.

4 Likes