It’s not a good practice to do though depends on your needs. It can be done by two ways, one is to disable for whole application and another is to disable for specific environments. You’re probably looking for some or all of the following settings:
If you set any of them to nil like following way:
config.active_record.logger = nil
It should disable logging for that specific component. You can experiment with these to disable logging for specific components or set all of them to nil to get no logging.