MySQL Forums
Forum List  »  MySQL Shell

Custom Log
Posted by: Srinivas K
Date: September 13, 2023 09:25PM

We are able to log the SQL queries, however we would like to customize the Log so that the OS User ID will be appended to the log message

for instance the current SQL log output

2023-09-14 03:12:25: Info: sql: tid=2736669664: SQL: select * from cust_master limit 2

If we have way to include the OS User ,in the log it will be great for auditing

2023-09-14 03:12:25: User: ${USER} Info: sql: tid=2736669664: SQL: select * from cust_master limit 2

The ${USER} is the os env system User , any thoughts on this ?

Options: ReplyQuote


Subject
Views
Written By
Posted
Custom Log
56
September 13, 2023 09:25PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.