I'm using Drupal 8 with the Monolog module (1.3) for external log support and Sentry logging, while preserving core database logging (dblog/watchdog). This all works, except that I can't find a way to control the watchdog logging level (so I'm getting a lot of debug logging in production environments).
Here is my monolog configuration (monolog.services.yml):
parameters:
monolog.channel_handlers:
default: ['drupal.dblog', 'drupal.raven']
custom1: ['rotating_file_custom1']
custom2: ['rotating_file_custom2']
custom3: ['rotating_file_custom3']
services:
monolog.handler.rotating_file_custom1:
class: Monolog\Handler\RotatingFileHandler
arguments: ['file://../logs/custom1.log', 25, 'monolog.level.debug']
monolog.handler.rotating_file_custom2:
class: Monolog\Handler\RotatingFileHandler
arguments: ['file://../logs/custom2.log', 25, 'monolog.level.debug']
monolog.handler.rotating_file_custom3:
class: Monolog\Handler\RotatingFileHandler
arguments: ['file://../logs/custom3.log', 25, 'monolog.level.debug' ]
I tried adding a new services handler for drupal.dblog using the DrupalHandler, but I couldn't figure out what arguments to use (arguments are required and it is expecting a LoggerInterface implementation as the first argument).
I've read through the module documentation, but it almost exclusively focuses on file/external logging.
Any suggestions?
TIA