How do I tell ActiveRecord not to log any control chars

前端 未结 3 1495
死守一世寂寞
死守一世寂寞 2021-02-06 09:35

Is there any way to tell active record not to log the ansi color codes when its logging stuff?

Eg. I do not want this in my logs.

[4;36;1mSQL (0.1ms)[0m         


        
3条回答
  •  我在风中等你
    2021-02-06 10:33

    Add this to your appropriate environment file (in my case development.rb)

    config.active_record.colorize_logging = false 
    

提交回复
热议问题