You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/13 02:29:50 UTC

[GitHub] [rocketmq] Oliverwqcwrw opened a new issue, #4589: The stream do not close

Oliverwqcwrw opened a new issue, #4589:
URL: https://github.com/apache/rocketmq/issues/4589

   
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   In `org.apache.rocketmq.logging.inner.LoggingBuilder.FileAppender#setFile(java.lang.String, boolean, boolean, int)`
   
   ostream do not close
   
   > 
        try {
                   ostream = new FileOutputStream(fileName, append);
               } catch (FileNotFoundException ex) {
                   String parentName = new File(fileName).getParent();
                   if (parentName != null) {
                       File parentDir = new File(parentName);
                       if (!parentDir.exists() && parentDir.mkdirs()) {
                           ostream = new FileOutputStream(fileName, append);
                       } else {
                           throw ex;
                       }
                   } else {
                       throw ex;
                   }
               }
               Writer fw = createWriter(ostream);
               if (bufferedIO) {
                   fw = new BufferedWriter(fw, bufferSize);
               }
               this.setQWForFiles(fw);
               this.fileName = fileName;
               this.fileAppend = append;
               this.bufferedIO = bufferedIO;
               this.bufferSize = bufferSize;
               writeHeader();
               SysLogger.debug("setFile ended");
   
   - What did you do (The steps to reproduce)?
   
   - What is expected to see?
   
   - What did you see instead?
   
   3. Please tell us about your environment:
   
   4. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   


-- 
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: dev-unsubscribe@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] Oliverwqcwrw commented on issue #4589: The stream do not close

Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw commented on issue #4589:
URL: https://github.com/apache/rocketmq/issues/4589#issuecomment-1186907695

   There are problems after closing the stream while printing logs asynchronously


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] Oliverwqcwrw closed issue #4589: The stream do not close

Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw closed issue #4589: The stream do not close
URL: https://github.com/apache/rocketmq/issues/4589


-- 
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: dev-unsubscribe@rocketmq.apache.org

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