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

Refactor logs:default command to scheduler-logs #3487

Closed
josegonzalez opened this issue Apr 9, 2019 · 2 comments · Fixed by #3501
Closed

Refactor logs:default command to scheduler-logs #3487

josegonzalez opened this issue Apr 9, 2019 · 2 comments · Fixed by #3501

Comments

@josegonzalez
Copy link
Member

josegonzalez commented Apr 9, 2019

Currently, the logs:default command calls the docker binary directly to retrieve application logs. This really belongs in the domain of the scheduler in use, as the docker binary may not always be used to run applications.

We should implement a scheduler-logs trigger, which would be called as follows:

# where `TAIL` and `PRETTY_PRINT` can be `true` or `false`
# `NUM` may be empty, meaning it has no specified value
plugin trigger scheduler-logs $DOKKU_SCHEDULER $APP $PROCESS_TYPE $TAIL $PRETTY_PRINT $NUM

A scheduler plugin may choose to implement the PRETTY_PRINT or NUM arguments, though should be able to:

  • tail logs (or output a reasonable number of lines, up to the implementor to decide)
  • fetch logs for all process types or just a single process type
  • when fetching logs for multiple process types, it must prefix each line with a variable approximating $DYNO.
@josegonzalez
Copy link
Member Author

Related is #2268, though a scheduler plugin may choose to ignore any and all log driver options for the purposes of retrieving logs.

josegonzalez added a commit that referenced this issue Apr 17, 2019
This change will allow other schedulers to implement log retrieval as necessary for the platform specified.

Closes #3487
@josegonzalez
Copy link
Member Author

Closing as there is a pull request open.

josegonzalez added a commit that referenced this issue Apr 17, 2019
This change will allow other schedulers to implement log retrieval as necessary for the platform specified.

Closes #3487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant