CLI option --logging-config-file to enable configuration of custom logs formatting doesn't work

Hello all!

Trying out a new 3.4.0 feature for custom logging configuration and it’s not working for me, still getting output as usual

Command to run:

docker run -v $(pwd):/app rasa/rasa:3.4.0-full run --logging-config-file=loggers.yml --debug

loggers.yml:

version: 1
disable_existing_loggers: false
formatters:
  logstashFormatter:
    format: "{\"@version\":\"1\",\"@timestamp\": \"%(asctime)s\", \"logger_name\": \"[%(name)s]\", \"level\": \"%(levelname)s\", \"message\": \"%(message)s\"}"
handlers:
  console:
    class: logging.StreamHandler
    formatter: logstashFormatter
    level: DEBUG
    stream: ext://sys.stdout
loggers:
  root:
    handlers: [ console ]
    level: DEBUG
  rasa:
    handlers: [ console ]
    level: DEBUG
    propagate: 0

What am I doing wrong? :slight_smile:

Hi, have you solved the problem yet? Got the same one here

It’s still not working for RASA, but working for rasa_sdk (rasa action server) and only with python 3.10

python -m rasa_sdk --debug --logging-config_file=./loggers.yml

{"@version":"1","@timestamp": "2023-01-11 16:28:38,157", "logger_name": "[rasa_sdk.endpoint]", "level": "INFO", "message": "Starting action endpoint server..."}

There is an issue for the bug - [OSS-658] - Jira, but no answer since the middle of december

I did dig in a bit more and found out that it might be related to here rasa/__main__.py at f42f7aa69463d2eec7c2383f52dc36a0944b3180 · RasaHQ/rasa · GitHub the code is trying to read attribute “logging-config-file” which does not existed, by changing it to “logging_config_file” works for me

It helped, thank you for your suggestion