You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Alexander Bij (JIRA)" <ji...@apache.org> on 2017/07/04 20:10:00 UTC
[jira] [Updated] (AIRFLOW-1371) Customize log_filepath to allow
files writen to NFS-shares
[ https://issues.apache.org/jira/browse/AIRFLOW-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Bij updated AIRFLOW-1371:
-----------------------------------
Description:
To be able to send logs to a NFS-mount the folder and files cannot contain (reserved characters)[https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx] like:
* < (less than)
* > (greater than)
* : (colon)
* " (double quote)
* / (forward slash)
* \ (backslash)
* | (vertical bar or pipe)
* ? (question mark)
* (asterisk)
Airflow writes the logs with an ISO-datetime format. This file contains one of these characters.
There are some solutions. What I would like is a configurable log_file_format to create log-files.
{code}
# Fetched by views.py and written by models.py currently like this:
@property
def log_filepath(self):
iso = self.execution_date.isoformat()
log = os.path.expanduser(configuration.get('core', 'BASE_LOG_FOLDER'))
return (
"{log}/{self.dag_id}/{self.task_id}/{iso}.log".format(**locals())){code}
was:
To be able to send logs to a NFS-mount the folder and files cannot contain [reserved characters](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx) like:
* < (less than)
* > (greater than)
* : (colon)
* " (double quote)
* / (forward slash)
* \ (backslash)
* | (vertical bar or pipe)
* ? (question mark)
* (asterisk)
Airflow writes the logs with an ISO-datetime format. This file contains one of these characters.
There are some solutions. What I would like is a configurable log_file_format to create log-files.
{code:python}
# Fetched by views.py and written by models.py currently like this:
@property
def log_filepath(self):
iso = self.execution_date.isoformat()
log = os.path.expanduser(configuration.get('core', 'BASE_LOG_FOLDER'))
return (
"{log}/{self.dag_id}/{self.task_id}/{iso}.log".format(**locals())){code}
> Customize log_filepath to allow files writen to NFS-shares
> ----------------------------------------------------------
>
> Key: AIRFLOW-1371
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1371
> Project: Apache Airflow
> Issue Type: Improvement
> Components: models
> Affects Versions: Airflow 1.8
> Reporter: Alexander Bij
> Priority: Minor
>
> To be able to send logs to a NFS-mount the folder and files cannot contain (reserved characters)[https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx] like:
> * < (less than)
> * > (greater than)
> * : (colon)
> * " (double quote)
> * / (forward slash)
> * \ (backslash)
> * | (vertical bar or pipe)
> * ? (question mark)
> * (asterisk)
> Airflow writes the logs with an ISO-datetime format. This file contains one of these characters.
> There are some solutions. What I would like is a configurable log_file_format to create log-files.
> {code}
> # Fetched by views.py and written by models.py currently like this:
> @property
> def log_filepath(self):
> iso = self.execution_date.isoformat()
> log = os.path.expanduser(configuration.get('core', 'BASE_LOG_FOLDER'))
> return (
> "{log}/{self.dag_id}/{self.task_id}/{iso}.log".format(**locals())){code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)