You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/05 13:36:55 UTC

[GitHub] [airflow] ewierschke opened a new issue #15672: Add option to send webserver audit logging to stdout

ewierschke opened a new issue #15672:
URL: https://github.com/apache/airflow/issues/15672


   **Description**
   
   While we've discovered that webserver audit logging (actions taken within the webserver, cli etc) appears to be written to the log table of the database, we have a need to have these logs written to stdout of the container running the webserver. 
   https://github.com/apache/airflow/blob/master/airflow/www/decorators.py#L33-L62
   https://github.com/apache/airflow/blob/master/airflow/models/log.py
   
   **Use case / motivation**
   
   Was hoping an option could be added to enable the same log table entries to be written to stdout to enable capture and centralization of all logs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] GuidoTournois edited a comment on issue #15672: Add option to send webserver audit logging to stdout

Posted by GitBox <gi...@apache.org>.
GuidoTournois edited a comment on issue #15672:
URL: https://github.com/apache/airflow/issues/15672#issuecomment-952799761


   As far as I could see, there are two ways you could reach your goal.
   
   1) Configure access log by gunicorn. This can be done by updating access_logfile in the airflow configuration file,  `airflow.cfg`. This however, does probably not give you the freedom you are looking for.
   
   2) A better option would be to add a new logger for the web server in `DEFAULT_LOGGING_CONFIG` (e.g. `airflow.webserver`) and retrieve this logger in the  `action_logging` decorator. That way, Airflow users can use the proposed way for setting up custom logging configurations as described here:
    https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html
    
   I am happy to work on option 2, let's see if that is something you could use.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #15672: Add option to send webserver audit logging to stdout

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #15672:
URL: https://github.com/apache/airflow/issues/15672#issuecomment-832693430


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] GuidoTournois commented on issue #15672: Add option to send webserver audit logging to stdout

Posted by GitBox <gi...@apache.org>.
GuidoTournois commented on issue #15672:
URL: https://github.com/apache/airflow/issues/15672#issuecomment-952799761


   As far as I could see, there are two ways you could reach your goal.
   
   1) Configure access log by gunicorn. This can be done by updating access_logfile in the airflow configuration file,  `airflow.cfg`. This however, does probably not give you the freedom you are looking for.
   
   2) A better option would be to add a new logger for the web server in `DEFAULT_LOGGING_CONFIG` (e.g. `airflow.webserver`) and retrieve this logger in the  `action_logging` decorator. That way, Airflow users can use the proposed way for setting up custom logging configurations as described here:
    https://airflow.apache.org/docs/apache-airflow/stable/logging-monitoring/logging-tasks.html
    
   I will work on option 2, let's see if that is something you could use.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org