Skip to content
Extraits de code Groupes Projets
Valider ce380d78 rédigé par Benjamin Neff's avatar Benjamin Neff Validation de Jonne Haß
Parcourir les fichiers

make sql and federation debug-logging configurable

by default both are disabled now, you can enable them in the
diaspora.yml if you need them.

closes #6090
parent ea4eebd2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# 0.5.2.0
# Refactor
## Refactor
* Update perfect-scrollbar [#6085](https://github.com/diaspora/diaspora/pull/6085)
## Features
* Add configuration options for some debug logs [#6090](https://github.com/diaspora/diaspora/pull/6090)
# 0.5.1.0
## Refactor
......
......@@ -35,6 +35,9 @@ defaults:
logrotate:
enable: true
days: 7
debug:
sql: false
federation: false
server:
port:
listen: '0.0.0.0:3000'
......
......@@ -149,6 +149,17 @@ configuration: ## Section
## The number of days to keep (default=7)
#days: 7
## Debug logging
debug: ## Section
## Enables the debug-logging for SQL (default=false)
## This logs every SQL-statement!
#sql: true
## Enables the federation-debug-log (default=false)
## This logs all XMLs that are used for the federation
#federation: true
## Settings affecting how ./script/server behaves.
server: ## Section
## Where the appserver should listen to (default=0.0.0.0:3000)
......
......@@ -79,9 +79,15 @@ Logging::Rails.configure do |config|
#
# config.log_to = %w[stdout file]
#
Logging.logger.root.level = config.log_level
Logging.logger.root.appenders = config.log_to unless config.log_to.empty?
# Default log-level (development=debug, production=info)
Logging.logger.root.level = config.log_level
# log-levels from the diaspora.yml for SQL and federation debug-logging
Logging.logger[ActiveRecord::Base].level = AppConfig.environment.logging.debug.sql? ? :debug : :info
Logging.logger["XMLLogger"].level = AppConfig.environment.logging.debug.federation? ? :debug : :info
# Under Phusion Passenger smart spawning, we need to reopen all IO streams
# after workers have forked.
#
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter