Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将内置 Logger 用于某些操作,将 log4r 用于其他一些操作... 指南解释说记录器是在应用程序级配置文件中设置的,例如:
Rails.logger = Logger.new(STDOUT) Rails.logger = Log4r::Logger.new("Application Log")
有没有办法在控制器或模型级别设置它?
您始终可以编写自定义记录器:
Logger
Log4r