# Standard library logging | Sentry for DelayedJob

##### Sentry Logs

Enable the Sentry Logs feature with `config.enable_logs = true` to unlock Sentry's full logging power. With Sentry Logs, you can search, filter, and analyze logs from across your entire application in one place.

To enable logging for all loggers that use Ruby [Logger](https://ruby-doc.org/3.4.1/stdlibs/logger/Logger.html) you can enable the `:logger` patch:

```ruby
Sentry.init do |config|
  config.dsn = "___PUBLIC_DSN___"
  config.enable_logs = true
  config.enabled_patches << :logger
end
```

Then all logs from `Logger` instances will be sent to Sentry, for example:

```ruby
logger = Logger.new($stdout)

logger.debug("Hello from stdlib logger")
logger.info("Hello from stdlib logger")
logger.error("Hello from stdlib logger")
```

You can filter which logs are sent to Sentry using the [`std_lib_logger_filter`](https://docs.sentry.io/platforms/ruby/configuration/options.md#std-lib-logger-filter) configuration option.

##### Note on structured logging

Ruby's stdlib logger does not support structured logging, that's why logs are sent to Sentry as plain messages with default attributes added automatically by the SDK.
