Category Archives: log

New path for MySQL query log on OSX

Sometimes during development I need to see what SQL queries are executed and listing them in Console.app is maybe the most convenient solution on OSX. To see queries in Console I just created /etc/mysql/my.cnf with: [mysqld] general_log = 1 # general_log_file … Continue reading

Posted in log, osx, Uncategorized | Tagged , , , , | Leave a comment

Enabling MySQL 5.7 query logging on OSX

I got used to it that sometimes I need to check the queries run by MySQL. After clean OSX upgrade I forgot to enable it. So I added the following to /etc/mysql/my.cnf: [mysqld] sql_mode= general_log = 1 general_log_file = /usr/local/mysql/data/mysqld.query.log … Continue reading

Posted in log, Uncategorized | Tagged , , | Leave a comment

Enable MySQL file logging

Wanted to know what queries are executed so I had to enable it for MariaDB. SET GLOBAL general_log = ‘ON’; SET GLOBAL general_log_file = ‘/var/log/mysql.log’; SET GLOBAL slow_query_log = ‘On’; SET GLOBAL slow_query_log_file = ‘/var/log/mysql-slow.log’; To see the changes: SHOW … Continue reading

Posted in linux, log, monitoring | Tagged , | 1 Comment

logrotate error: stat of /var/log/xferlog failed

In Arch Linux the logrotate service was failing: user@host# systemctl start logrotate.service Job for logrotate.service failed. See “systemctl status logrotate.service” and “journalctl -xe” for details. So I ran it by hand to debug: user@host# logrotate /etc/logrotate.conf And the following error … Continue reading

Posted in cli, linux, log, monitoring | Tagged , , , | Leave a comment

Switched from Console.app to multitail

With Console.app I had the problem that when I switched to output /var/log/apache2/error_log I didn’t see /var/log/system.log and yesterday I read http://kkovacs.eu/cool-but-obscure-unix-tools and found multitail so I played with it. I’m currently running the following setup on OSX Mountain Lion … Continue reading

Posted in cli, linux, log, monitoring, net, osx | Leave a comment