Sha256: 7ac46bfe26561d3288cd2eb874c3de92c31680682b0d27dcb349b6b37db98269

Contents?: true

Size: 295 Bytes

Versions: 2

Compression:

Stored size: 295 Bytes

Contents

# Patch the Rails::Server log_to_stdout so that it logs via SemanticLogger
Rails::Server
module Rails
  class Server
    private

    def log_to_stdout
      wrapped_app # touch the app so the logger is set up

      SemanticLogger.add_appender(io: $stdout, formatter: :color)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_semantic_logger-4.6.1 lib/rails_semantic_logger/extensions/rails/server.rb
rails_semantic_logger-4.6.0 lib/rails_semantic_logger/extensions/rails/server.rb