# Monitoring & Logging (Ruby on Rails) > Rails.logger, log levels, Sentry, New Relic, ActiveSupport::Notifications, tracing, correlation IDs, observability - 20 gespreksvragen - Senior - [Gespreksvragen: Ruby on Rails](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen.md) ## 1. Wat is de standaard logger die wordt gebruikt in een Rails-applicatie? **Antwoord** Rails gebruikt Rails.logger als het belangrijkste toegangspunt tot het loggingsysteem. Standaard is dit een instantie van ActiveSupport::Logger die naar bestanden zoals log/development.log, log/production.log, enz. schrijft, afhankelijk van de omgeving. Deze logger wordt automatisch geconfigureerd bij het opstarten van de applicatie en is overal in de Rails-code toegankelijk. ## 2. Wat zijn de vijf logniveaus die in Rails beschikbaar zijn, van minst tot meest kritiek? **Antwoord** Rails gebruikt vijf standaard logniveaus: debug (gedetailleerde informatie voor ontwikkeling), info (algemene operationele informatie), warn (niet-blokkerende waarschuwingen), error (herstelbare fouten) en fatal (kritieke fouten die tot afsluiting leiden). Elk niveau filtert berichten van lagere niveaus weg, waardoor de uitgebreidheid per omgeving kan worden aangepast. ## 3. Hoe configureer je het logniveau in productie in Rails? **Antwoord** Het logniveau in productie wordt geconfigureerd in config/environments/production.rb via config.log_level. De standaardwaarde is :info om te voorkomen dat er in productie te veel gegevens worden gegenereerd. Het is ook mogelijk het niveau dynamisch in te stellen via een omgevingsvariabele zoals ENV.fetch('RAILS_LOG_LEVEL', 'info').to_sym, voor maximale flexibiliteit zonder opnieuw te deployen. ## Nog 17 vragen beschikbaar - Hoe log je in Rails een bericht met gestructureerde gegevens om analyse te vergemakkelijken? - Wat is het verschil tussen Rails.logger.debug en Rails.logger.debug { } met een block? Meld je gratis aan: https://sharpskill.dev/nl/login ## Andere Ruby on Rails-sollicitatieonderwerpen - [Ruby-basis](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/ruby-basics.md): 25 vragen, Junior - [Objectgeoriënteerd programmeren in Ruby](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/ruby-oop.md): 20 vragen, Junior - [Rails-grondbeginselen](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-fundamentals.md): 18 vragen, Junior - [Routing & Controllers](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/routing-controllers.md): 22 vragen, Junior - [ActiveRecord-basis](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-record-basics.md): 25 vragen, Junior - [Views & ERB-templates](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/views-erb-templates.md): 20 vragen, Junior - [ActiveRecord-associaties](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-record-associations.md): 24 vragen, Mid-Level - [Geavanceerde ActiveRecord-query's](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-record-queries.md): 28 vragen, Mid-Level - [Rails-formulieren](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-forms.md): 20 vragen, Mid-Level - [Authenticatie & autorisatie](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/authentication-authorization.md): 22 vragen, Mid-Level - [Moderne Asset Pipeline & frontend](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-asset-pipeline.md): 18 vragen, Mid-Level - [Rails API-modus](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-api-mode.md): 20 vragen, Mid-Level - [Testen met RSpec](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-testing-rspec.md): 24 vragen, Mid-Level - [ActiveJob & Background Jobs](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-job-background-jobs.md): 20 vragen, Mid-Level - [ActionCable & WebSockets](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/action-cable-websockets.md): 18 vragen, Mid-Level - [ActionMailer](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/action-mailer.md): 18 vragen, Mid-Level - [ActiveStorage](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/active-storage.md): 20 vragen, Mid-Level - [Cachingstrategieën](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/caching-strategies.md): 20 vragen, Mid-Level - [Geavanceerde migraties](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/database-migrations-advanced.md): 20 vragen, Mid-Level - [Rails Engines & modulaire apps](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-engines-modular-apps.md): 18 vragen, Senior - [Prestatie-optimalisatie](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/performance-optimization.md): 26 vragen, Senior - [Rails Design Patterns](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-design-patterns.md): 22 vragen, Senior - [Ruby-metaprogrammering](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/ruby-metaprogramming.md): 20 vragen, Senior - [Rails-beveiliging](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-security.md): 22 vragen, Senior - [GraphQL met Rails](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/graphql-rails.md): 20 vragen, Senior - [Deployment & Productie](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-deployment-production.md): 20 vragen, Senior - [Rails-upgradestrategieën](https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/rails-upgrade-strategies.md): 18 vragen, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/nl/technologies/ruby-on-rails/sollicitatievragen/monitoring-logging