【问题标题】:Silencing Rails Console Log for ActionCable Steam使 ActionCable Steam 的 Rails 控制台日志静音
【发布时间】:2018-02-28 22:07:24
【问题描述】:

我已将我的频道连接到外部网站 Steam。所有这些数据都通过控制台流式传输。很高兴看到传入的信息,但有没有办法让控制台中的每个频道流静音?

【问题讨论】:

    标签: ruby-on-rails actioncable


    【解决方案1】:

    as described in the following post 并在我自己的 ActionCable 应用程序中进行了测试https://sprachspiel.xyz/

    在 config/environments/development.rbproduction.rb

    要完全禁用 ActionCable 的日志记录,您应该将 ActionCable 配置为使用什么都不做的记录器

    ActionCable.server.config.logger = Logger.new(nil)

    这将删除以下消息并将GET 请求保留到/cable

    Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
    MessagesChannel is transmitting the subscription confirmation
    MessagesChannel is streaming from messages
    

    【讨论】:

      猜你喜欢
      • 2015-10-28
      • 2017-07-22
      • 2020-05-07
      • 2016-11-16
      • 2012-11-17
      • 2011-11-25
      • 2019-08-05
      • 2019-02-08
      • 1970-01-01
      相关资源
      最近更新 更多