Rasa: where to find log files?

Created on 9 May 2018  路  4Comments  路  Source: RasaHQ/rasa

Rasa Core version:
Master (commit 241979ca4fbe22083aec7b1b6c37810cc0ce2e6c)

Python version:
3.5.2
Operating system (windows, osx, ...):
linux
Issue:
Hi, I run the bot in a terminal, using simply:

def run(serve_forever=True):

    interpreter = RasaNLUInterpreter("a_path")
    agent = Agent.load("a_different_path", interpreter=interpreter)

    if serve_forever:
        agent.handle_channel(ConsoleInputChannel())
    return agent

It would be great if I could specify the location of a logfile, where for example all the user input and interpreter output would be stored. If such a file is already being created, it is indeed very well hidden, so a pointer to its default location would be much appreciated :)

Without such a file, the only way to debug a weird conversation is to exit the bot and launch the online training, trying to reproduce the same conversation flow...

Thanks for your help,

Andrea.

Most helpful comment

Hi,

sorry, but this is still not working. in master now, when running a ConsoleInputChannel, one gets the same logs both on screen and in the logfile. in case of debug, this makes it just impossible to converse with the bot, since text is lost in a flood of debugging info.

we should be able to configure different logging levels for the Console and for the log file.

Andrea

PS: on master, this is what I am doing

def run(serve_forever=True):

    utils.configure_colored_logging(logging.DEBUG)
    utils.configure_file_logging(logging.DEBUG,
                                 './rasa_core.log')

    log = logging.getLogger('werkzeug')
    log.setLevel(logging.WARN)

    interpreter = RasaNLUInterpreter("../../models/nlu/default/current")
    agent = Agent.load("../../models/dialogue", interpreter=interpreter)

    if serve_forever:
        agent.handle_channel(ConsoleInputChannel())
    return agent

the DEBUG messages are both printed on screen and saved on file. setting the colored_logging to CRITICAL and the file_logging to DEBUG, results in only CRITICAL messages to be recorded (both on screen and on file).

All 4 comments

I want to support this! I run it with
python -m rasa_core.run -d models/dialogue -u models/nlu/default/weathernlu --port 5004 --connector slack --credentials slack_credentials.yml --log_file rasa_core.log.
Still there is no log created, or i can't just find the file.

Yes, so we just noticed that the run script isn't actually generating a log file - it's fixed in the simpler_generator branch now, which should be merged in the near future.

Hi,

sorry, but this is still not working. in master now, when running a ConsoleInputChannel, one gets the same logs both on screen and in the logfile. in case of debug, this makes it just impossible to converse with the bot, since text is lost in a flood of debugging info.

we should be able to configure different logging levels for the Console and for the log file.

Andrea

PS: on master, this is what I am doing

def run(serve_forever=True):

    utils.configure_colored_logging(logging.DEBUG)
    utils.configure_file_logging(logging.DEBUG,
                                 './rasa_core.log')

    log = logging.getLogger('werkzeug')
    log.setLevel(logging.WARN)

    interpreter = RasaNLUInterpreter("../../models/nlu/default/current")
    agent = Agent.load("../../models/dialogue", interpreter=interpreter)

    if serve_forever:
        agent.handle_channel(ConsoleInputChannel())
    return agent

the DEBUG messages are both printed on screen and saved on file. setting the colored_logging to CRITICAL and the file_logging to DEBUG, results in only CRITICAL messages to be recorded (both on screen and on file).

reopened as #465, since the problem is now somewhat different.

Was this page helpful?
0 / 5 - 0 ratings