rails / activerecord-session_store

Active Record's Session Store extracted from Rails
MIT License
547 stars 188 forks source link

Silence update sql log in session upgrade #181

Open biinari opened 3 years ago

biinari commented 3 years ago

When upgrading sessions using secure! directly or using the rake task db:sessions:upgrade, it would log entries like:

  ActiveRecord::SessionStore::Session Load (3.1ms)  SELECT  "sessions".* FROM "s
essions" ORDER BY "sessions"."id" ASC LIMIT 1000
  ActiveRecord::SessionStore::Session Update (1.9ms)  UPDATE "sessions" SET "ses
sion_id" = '2::[some_session_id]'
 WHERE "sessions"."id" = 2

Silence logger for these operations to prevent logging session ids.