Skip to content

Commit

Permalink
[AIRFLOW-771] Make S3 logs append instead of clobber
Browse files Browse the repository at this point in the history
Closes apache#2003 from
aoen/ddavydov/make_airflow_logs_append_only
  • Loading branch information
aoen authored and bolkedebruin committed Jan 20, 2017
1 parent a3927e2 commit 5933fca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions airflow/bin/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,7 @@ def run(args, dag=None):
logging_utils.S3Log().write(log, remote_log_location)
# GCS
elif remote_base.startswith('gs:/'):
logging_utils.GCSLog().write(
log,
remote_log_location,
append=True)
logging_utils.GCSLog().write(log, remote_log_location)
# Other
elif remote_base and remote_base != 'None':
logging.error(
Expand Down
4 changes: 2 additions & 2 deletions airflow/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def read(self, remote_log_location, return_error=False):
logging.error(err)
return err if return_error else ''

def write(self, log, remote_log_location, append=False):
def write(self, log, remote_log_location, append=True):
"""
Writes the log to the remote_log_location. Fails silently if no hook
was created.
Expand Down Expand Up @@ -159,7 +159,7 @@ def read(self, remote_log_location, return_error=False):
logging.error(err)
return err if return_error else ''

def write(self, log, remote_log_location, append=False):
def write(self, log, remote_log_location, append=True):
"""
Writes the log to the remote_log_location. Fails silently if no hook
was created.
Expand Down

0 comments on commit 5933fca

Please sign in to comment.