beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lc...@apache.org
Subject [beam] branch master updated: Add the appropriate extension to log files. (#8287)
Date Fri, 12 Apr 2019 20:07:51 GMT
This is an automated email from the ASF dual-hosted git repository.

lcwik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new d79d836  Add the appropriate extension to log files. (#8287)
d79d836 is described below

commit d79d8367cc7c3feaab7c64841fdf9a7e870084f4
Author: jasonkuster <jasonkuster@google.com>
AuthorDate: Fri Apr 12 13:07:38 2019 -0700

    Add the appropriate extension to log files. (#8287)
    
    Files are created with the filename.<date> extension which is not a valid filetype
and can cause difficulties for people when trying to open logs. Set it to add an appropriate
extension instead.
---
 .../runners/dataflow/worker/logging/DataflowWorkerLoggingHandler.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingHandler.java
b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingHandler.java
index 7428390..0fdb4ae 100644
--- a/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingHandler.java
+++ b/runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingHandler.java
@@ -273,7 +273,7 @@ public class DataflowWorkerLoggingHandler extends Handler {
     @Override
     public OutputStream get() {
       try {
-        String filename = filepath + "." + formatter.format(new Date());
+        String filename = filepath + "." + formatter.format(new Date()) + ".log";
         return new BufferedOutputStream(
             new FileOutputStream(new File(filename), true /* append */));
       } catch (IOException e) {


Mime
View raw message