Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --log-file option when using the action server #161

Closed
1 task
roniemartinez opened this issue Mar 27, 2020 · 10 comments
Closed
1 task

Add --log-file option when using the action server #161

roniemartinez opened this issue Mar 27, 2020 · 10 comments
Labels
help wanted Extra attention is needed stale type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@roniemartinez
Copy link

Description of Problem:
There is no option to save logs to a log file when using the actions server from the command line as oppose to API server with --log-file argument

% rasa run actions --help
usage: rasa run actions [-h] [-v] [-vv] [--quiet] [-p PORT]
                        [--cors [CORS [CORS ...]]] [--actions ACTIONS]
                        [--ssl-keyfile SSL_KEYFILE]
                        [--ssl-certificate SSL_CERTIFICATE]
                        [--ssl-password SSL_PASSWORD]

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  port to run the server at (default: 5055)
  --cors [CORS [CORS ...]]
                        enable CORS for the passed origin. Use * to whitelist
                        all origins (default: None)
  --actions ACTIONS     name of action package to be loaded (default: None)
  --ssl-keyfile SSL_KEYFILE
                        Set the SSL certificate to create a TLS secured
                        server. (default: None)
  --ssl-certificate SSL_CERTIFICATE
                        Set the SSL certificate to create a TLS secured
                        server. (default: None)
  --ssl-password SSL_PASSWORD
                        If your ssl-keyfile is protected by a password, you
                        can specify it using this paramer. (default: None)

Python Logging Options:
  -v, --verbose         Be verbose. Sets logging level to INFO. (default:
                        None)
  -vv, --debug          Print lots of debugging statements. Sets logging level
                        to DEBUG. (default: None)
  --quiet               Be quiet! Sets logging level to WARNING. (default:
                        None)

Overview of the Solution:
Add option for the action server to save logs to a log file similar to what the API server can do.

Definition of Done:

  • Can pass --log-file as command line parameter
@roniemartinez roniemartinez added the type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR label Mar 27, 2020
@sara-tagger
Copy link

Thanks for raising this issue, @erohmensing will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@erohmensing
Copy link
Contributor

erohmensing commented Mar 27, 2020

Hi @roniemartinez, i think this sounds like a promising enhancement.

when using the actions server from the command line as oppose to API server
Sorry, can you get the logs from the API server? I'm not aware of that option.

One thing to think about is that when the SDK is running as an image, it runs via the start command https://github.com/RasaHQ/rasa-sdk/blob/master/Dockerfile#L40
so i guess that parameter would need to be available for both methods

@roniemartinez roniemartinez changed the title Add --log-file option to when using the action server Add --log-file option when using the action server Mar 27, 2020
@roniemartinez
Copy link
Author

Sorry, can you get the logs from the API server? I'm not aware of that option.

@erohmensing I misread it as you incorrectly added it to the quotes. It is actually the action server that does not have an option to save logs to a file. The logs can only be seen in the command line.

As for the API server, you can simply do this:

rasa run --log-file rasa.log --enable-api

For the action server, this does not work since the --log-file option does not belong to the subparser. And the subparser does not have this option as you can see from my above description.

rasa run --log-file rasa.log actions

@erohmensing
Copy link
Contributor

Ah I see what you mean, the Rasa server, not the API of the Action Server.

Would you like to work on adding this feature?

@roniemartinez
Copy link
Author

Would you like to work on adding this feature?

We'll see. Though, I certainly have not enough time right now.

@erohmensing
Copy link
Contributor

Okay, I will open it up for other community members to contribute, then 🙂

@erohmensing erohmensing added the help wanted Extra attention is needed label Mar 31, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 3, 2020
@erohmensing erohmensing removed the stale label Jul 6, 2020
@stale
Copy link

stale bot commented Oct 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 4, 2020
@erohmensing erohmensing removed the stale label Oct 5, 2020
@dingusagar
Copy link
Contributor

Have created a PR for this issue here #306 . Please review and give comments if any.

@stale
Copy link

stale bot commented Jan 23, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed stale type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

No branches or pull requests

4 participants