WayneZhao
WayneZhao

Reputation: 1557

rpush gem disable rails log output

I am using rpush gem to send notification to IOS and Android. Every thing works. However the rpush gem create log in log/production.log every few seconds. Is there a way to disable the log from rpush gem?

Upvotes: 0

Views: 492

Answers (1)

fnln
fnln

Reputation: 230

Ugly, but overwriting the Logging methods should work. Place the following in an initializer, like rpush.rb or similar.

module Rpush
  class Logger
    def info(msg, inline = false)
    end

    def error(msg, inline = false)
    end

    def warn(msg, inline = false)
    end
  end
end

Upvotes: 1

Related Questions