Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Activerecord 如何使用活动记录关闭Sinatra中的SQLite3记录器?_Activerecord_Logging_Rspec_Sqlite_Sinatra - Fatal编程技术网

Activerecord 如何使用活动记录关闭Sinatra中的SQLite3记录器?

Activerecord 如何使用活动记录关闭Sinatra中的SQLite3记录器?,activerecord,logging,rspec,sqlite,sinatra,Activerecord,Logging,Rspec,Sqlite,Sinatra,guard output(防护输出)窗口将充满 D, [2012-11-19T18:36:30.391459 #53057] DEBUG -- : (0.1ms) begin transaction D, [2012-11-19T18:36:30.392668 #53057] DEBUG -- : SQL (0.4ms) INSERT INTO "foo" ("created_at", "id", "foo", "foo", "updated_at", "value") VALUE

guard output(防护输出)窗口将充满

D, [2012-11-19T18:36:30.391459 #53057] DEBUG -- :    (0.1ms)  begin transaction
D, [2012-11-19T18:36:30.392668 #53057] DEBUG -- :   SQL (0.4ms)  INSERT INTO "foo" ("created_at", "id", "foo", "foo", "updated_at", "value") VALUES (?, ?, ?, ?, ?, ?)  [["created_at", 2012-11-19 18:36:30 -0800], ["id", 4], ["bar", 2], ["foo", 12], ["updated_at", 2012-11-19 18:36:30 -0800], ["value", true]]
D, [2012-11-19T18:36:30.393572 #53057] DEBUG -- :    (0.7ms)  commit transaction
如何关闭此输出

我尝试了
ActiveRecord::Base.logger=nil
,但这似乎没有任何作用

使用
sinatra activerecord
rspec
guard

ActiveRecord::Base.logger.level = 1
任何值为1或更大的作品。我想它可能也适用于其他数据库