0

Currently, my log entries look like:

time message
03:53:08 PM ERROR
05:40:32 PM ERROR
... ...

I want the date included, like this:

time message
06/30/2022 03:53:08 PM ERROR
06/30/2022 05:40:32 PM ERROR
... ...

My global variables:

SHOW GLOBAL VARIABLES LIKE '%log%'
Variable_name Value
binlog_format MIXED
date_format %Y-%m-%d
datetime_format %Y-%m-%d %H:%i:%s
default_week_format 0
innodb_default_row_format dynamic
innodb_file_format
mysql56_temporal_format ON
time_format %H:%i:%s

My DBMS version:

@@version is 10.5.15-MariaDB-0+deb11u1

0

1 Answer 1

0

Consider changing your my.cnf [mysqld] section to include:

time_format=%Y-%m-%d %H:%i:%s 

That should make the time_format the same as datetime_format and might be your answer.

Create a backup of your existing my.cnf file just in case you make a mistake while editing it.

Stop/start the instance and see what your log in question has with this change in place, please.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.