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

Configure log level within the Cortex API spec config #1484

Closed
RobertLucian opened this issue Oct 26, 2020 · 0 comments · Fixed by #1741
Closed

Configure log level within the Cortex API spec config #1484

RobertLucian opened this issue Oct 26, 2020 · 0 comments · Fixed by #1741
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@RobertLucian
Copy link
Member

RobertLucian commented Oct 26, 2020

Description

Add a field in the cortex.yaml API spec that allows the user to set the log level for their API deployments:

- name: <string>  # API name (required)
  predictor:
    ...
    log_level: info # allow CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET
    ... 

The default log level set would be INFO.

Consider adding a guide to showcase using cx_logger() in predictor implementations.

Motivation

To prevent spamming the log lines with unnecessary information. As pointed out by @vackosar.

Issues to sort out

  1. Looks like uvicorn ignores our log levels from log_config.yaml, and for that, we'd have to have something like:
    logs with FastAPI and Uvicorn tiangolo/fastapi#1508 (comment)
  2. The log levels set in log_config.yaml don't seem to apply to the cx_logger - info is still the default log level regardless of which level is set in log_config.yaml.
@RobertLucian RobertLucian added the enhancement New feature or request label Oct 26, 2020
@RobertLucian RobertLucian added this to To prioritize in Cortex via automation Oct 26, 2020
@deliahu deliahu moved this from To prioritize to Backlog in Cortex Oct 27, 2020
@deliahu deliahu removed this from Backlog in Cortex Nov 26, 2020
@RobertLucian RobertLucian self-assigned this Dec 18, 2020
@RobertLucian RobertLucian added this to the v0.25 milestone Dec 18, 2020
@deliahu deliahu removed this from the v0.25 milestone Dec 23, 2020
@RobertLucian RobertLucian modified the milestone: v0.25 Dec 23, 2020
@deliahu deliahu added this to the v0.26 milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants