Kouhei Sutou
kou****@clear*****
2013年 5月 13日 (月) 18:28:50 JST
須藤です。 In <5190A****@rozet*****> "[groonga-dev,01381] Re: [ANN] mroonga 3.03" on Mon, 13 May 2013 17:56:06 +0900, 磯部 和広 <k-iso****@rozet*****> wrote: > 前回は、 > my.cnfにERRORと設定して起動→それでもログが出まくる > コマンドでNONEにする→それでもログが出まくる > my.confでNONEにしてDB再起動→それでもログが出まくる > となったので投稿しました。 > > >クライアントから「SET GLOBAL Mroonga_log_level = NONE」とし > >たときだけ確認 > > どうも、当方の状況と違うようです。 > ※当方では、コマンドからNONEにしても出まくっていました。 > > クライアントから、DEBUGやERROR等にログレベルを変更し > 正しくログレベルが変わるかも併せて確認して頂けないでしょうか。 あれ、こちらは3.03のままで大丈夫でしたよ。 Ubuntu 13.04があったので、念のため、今、パッケージでインストー ルしてもう一度試してみました。 % dpkg -l | grep mysql-server ii mysql-server 5.5.31-0ubuntu0.13 all MySQL database server (metapackage depending on the latest ii mysql-server-5.5 5.5.31-0ubuntu0.13 amd64 MySQL database server binaries and system database setup ii mysql-server-core-5.5 5.5.31-0ubuntu0.13 amd64 MySQL database server binaries ii mysql-server-mroonga 3.03-1 amd64 A fast fulltext searchable storage engine for MySQL. % sudo tee /var/lib/mysql/groonga.log < /dev/null % sudo tail /var/lib/mysql/groonga.log % mysql -u root mysql> SELECT * FROM information_schema.PLUGINS WHERE PLUGIN_NAME = "mroonga"\G *************************** 1. row *************************** PLUGIN_NAME: mroonga PLUGIN_VERSION: 3.3 PLUGIN_STATUS: ACTIVE PLUGIN_TYPE: STORAGE ENGINE PLUGIN_TYPE_VERSION: 50531.0 PLUGIN_LIBRARY: ha_mroonga.so PLUGIN_LIBRARY_VERSION: 1.3 PLUGIN_AUTHOR: The mroonga project PLUGIN_DESCRIPTION: CJK-ready fulltext search, column store PLUGIN_LICENSE: GPL LOAD_OPTION: ON 1 row in set (0.00 sec) mysql> CREATE DATABASE mroonga_test; Query OK, 1 row affected (0.02 sec) mysql> USE mroonga_test; Database changed mysql> CREATE TABLE aaa (id INT) ENGINE=mroonga; Query OK, 0 rows affected (0.01 sec) (別の端末)% sudo tail /var/lib/mysql/groonga.log 2013-05-13 18:22:35.816752|i|c1180700|database not found. creating...(mroonga_test.mrn) 2013-05-13 18:22:35.820430|n|c1180700|DDL:table_create aaa 2013-05-13 18:22:35.821461|n|c1180700|DDL:column_create aaa id (別の端末)% mysql> SET GLOBAL mroonga_log_level = NONE; Query OK, 0 rows affected (0.00 sec) mysql> CREATE TABLE bbb (id INT) ENGINE=mroonga; Query OK, 0 rows affected (0.01 sec) (別の端末)% sudo tail /var/lib/mysql/groonga.log 2013-05-13 18:22:35.816752|i|c1180700|database not found. creating...(mroonga_test.mrn) 2013-05-13 18:22:35.820430|n|c1180700|DDL:table_create aaa 2013-05-13 18:22:35.821461|n|c1180700|DDL:column_create aaa id (別の端末)% ※ ↑ログが増えていない mysql> SET GLOBAL mroonga_log_level = NOTICE; Query OK, 0 rows affected (0.00 sec) mysql> CREATE TABLE ccc (id INT) ENGINE=mroonga; Query OK, 0 rows affected (0.00 sec) (別の端末)% sudo tail /var/lib/mysql/groonga.log 2013-05-13 18:22:35.816752|i|c1180700|database not found. creating...(mroonga_test.mrn) 2013-05-13 18:22:35.820430|n|c1180700|DDL:table_create aaa 2013-05-13 18:22:35.821461|n|c1180700|DDL:column_create aaa id 2013-05-13 18:24:42.622244|n|c1180700|log level changed from 'NONE' to 'NOTICE' 2013-05-13 18:24:46.431128|n|c1180700|DDL:table_create ccc 2013-05-13 18:24:46.432329|n|c1180700|DDL:column_create ccc id (別の端末)% ※ ↑ログが増えている というように、SET GLOBALは効いているようにみえます。 こちらでも確認してみますので、どのように設定したか教えてもら えないでしょうか。 > また、お手数ですが、groonga.logの正しいローテート方法を教えて頂けないで > しょうか。 はい! こうです! % sudo -u mysql -H mv /var/lib/mysql/groonga.log /var/lib/mysql/groonga.log.1 % mysql -u root mysql> FLUSH LOGS; Query OK, 0 rows affected (0.00 sec) ログファイルをmvしてからSQLでFLUSH LOGSです。 -- 須藤 功平 <kou****@clear*****> 株式会社クリアコード <http://www.clear-code.com/> (03-6231-7270) groongaサポート: http://groonga.org/ja/support/ パッチ採用はじめました: http://www.clear-code.com/recruitment/ コミットへのコメントサービスはじめました: http://www.clear-code.com/services/commit-comment.html