sysown / proxysql

High-performance MySQL proxy with a GPL license.
http://www.proxysql.com
GNU General Public License v3.0
5.89k stars 963 forks source link

Is there a possibility to change ProxySQL log level to "Error"/"Warn" than "INFO" #3287

Open navya-dev opened 3 years ago

navya-dev commented 3 years ago

Example logs: 2021-02-04 14:48:54 [INFO] Dumping current MySQL Servers structures for hostgroup ALL 2021-02-04 14:48:54 [INFO] Dumping mysql_servers LEFT JOIN mysql_servers_incoming

renecannao commented 3 years ago

You shouldn't have a lot of those INFO messages to have huge log. Can you attach few MBs of logs?

navya-dev commented 3 years ago

Sure, here is the log file. It would be great if you can let me know what it is indicating. logs.txt

erikbergsma commented 1 year ago

since this issue is open, i'd like to second this request!

as i can see it, proxysql has 4 loglevels: ~debug level:

Standard ProxySQL MySQL Logger rev. 2.0.0714 -- MySQL_Logger.cpp -- Mon May 30 07:00:09 2022
Standard ProxySQL Cluster rev. 0.4.0906 -- ProxySQL_Cluster.cpp -- Mon May 30 07:00:09 2022
Standard ProxySQL Statistics rev. 1.4.1027 -- ProxySQL_Statistics.cpp -- Mon May 30 07:00:09 2022
Standard ProxySQL HTTP Server Handler rev. 1.4.1031 -- ProxySQL_HTTP_Server.cpp -- Mon May 30 07:00:09 2022

info level:

2022-06-10 17:11:36 [INFO] ProxySQL SHA1 checksum: 760ce855664901607cd41b883b386bffda88b3f2
2022-06-10 17:11:36 [INFO] Starting ProxySQL
2022-06-10 17:11:36 [INFO] Successfully started
2022-06-10 17:11:36 [INFO] Angel process started ProxySQL process 3939546
2022-06-10 17:11:36 [INFO] Loaded built-in SQLite3

warn level

2022-06-10 17:11:36 ProxySQL_Admin.cpp:6605:flush_mysql_variables___database_to_runtime(): [WARNING] Impossible to set not existing variable ping_interval_server with value "10000". Deleting. If the variable name is correct, this version doesn't support it

error level

2022-06-10 17:11:36 MySQL_Monitor.cpp:968:monitor_connect_thread(): [ERROR] Server 127.0.0.1:3306 is returning "Access denied" for monitoring user

i very much would like if i as an admin can configure in the config or trough a startup flag (--loglevel=error) which loglevels proxysql outputs.

configuring in this way will help sysadmins to do things like: suppress non warnings, which in turn will save space (and cost) in my log-aggregator, and improve finding anomalies and problems in my infrastructure (needle in the haystack)

agalobart commented 1 year ago

^^^

markkrj commented 1 year ago

As currently there is no way to change the logging level, might this issue be renamed/changed to track a feature request for it? Or I can open a new one if you prefer @renecannao

derN3rd commented 6 months ago

Any news on that topic?

We are still using an older version where we get a log of the [WARNING] Unable to parse unknown SET query from client (already fixed in a newer version) that fills up the disk space rapidly, but cannot upgrade to a newer release in the next couple of months.

Or is there a known workaround?

I'm currently using a script that deleted the logs and then runs PROXYSQL FLUSH LOGS afterwards to recreate new files.

Thanks in advance