You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/15 20:40:16 UTC

[GitHub] [logging-log4cxx] rm5248 opened a new pull request #102: Create intermediate directories for both fixedwindowrollingpolicy and…

rm5248 opened a new pull request #102:
URL: https://github.com/apache/logging-log4cxx/pull/102


   … timebasedrollingpolicy


-- 
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: notifications-unsubscribe@logging.apache.org

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



[GitHub] [logging-log4cxx] rm5248 commented on a change in pull request #102: Create intermediate directories for both fixedwindowrollingpolicy and…

Posted by GitBox <gi...@apache.org>.
rm5248 commented on a change in pull request #102:
URL: https://github.com/apache/logging-log4cxx/pull/102#discussion_r795079918



##########
File path: src/main/cpp/rollingpolicybase.cpp
##########
@@ -38,6 +39,7 @@ IMPLEMENT_LOG4CXX_OBJECT(RollingPolicyBase)
 
 RollingPolicyBase::RollingPolicyBase()
 {
+	createIntermediateDirectories = false;

Review comment:
       I've gone and updated it to create the directories by default(and update the unit tests as well).




-- 
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: notifications-unsubscribe@logging.apache.org

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



[GitHub] [logging-log4cxx] rm5248 merged pull request #102: Create intermediate directories for both fixedwindowrollingpolicy and…

Posted by GitBox <gi...@apache.org>.
rm5248 merged pull request #102:
URL: https://github.com/apache/logging-log4cxx/pull/102


   


-- 
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: notifications-unsubscribe@logging.apache.org

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



[GitHub] [logging-log4cxx] ams-tschoening commented on a change in pull request #102: Create intermediate directories for both fixedwindowrollingpolicy and…

Posted by GitBox <gi...@apache.org>.
ams-tschoening commented on a change in pull request #102:
URL: https://github.com/apache/logging-log4cxx/pull/102#discussion_r785672563



##########
File path: src/main/cpp/rollingpolicybase.cpp
##########
@@ -38,6 +39,7 @@ IMPLEMENT_LOG4CXX_OBJECT(RollingPolicyBase)
 
 RollingPolicyBase::RollingPolicyBase()
 {
+	createIntermediateDirectories = false;

Review comment:
       @stephen-webb @swebb2066 What's your opinion on this?




-- 
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: notifications-unsubscribe@logging.apache.org

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



[GitHub] [logging-log4cxx] ams-tschoening commented on a change in pull request #102: Create intermediate directories for both fixedwindowrollingpolicy and…

Posted by GitBox <gi...@apache.org>.
ams-tschoening commented on a change in pull request #102:
URL: https://github.com/apache/logging-log4cxx/pull/102#discussion_r785426142



##########
File path: src/main/cpp/rollingpolicybase.cpp
##########
@@ -38,6 +39,7 @@ IMPLEMENT_LOG4CXX_OBJECT(RollingPolicyBase)
 
 RollingPolicyBase::RollingPolicyBase()
 {
+	createIntermediateDirectories = false;

Review comment:
       While I understand using `false` for backwards compatibility, isn't the whole point of the [issue](https://issues.apache.org/jira/browse/LOGCXX-525) and PR to fix unexpected behavior/limitations? Other implementations of [appenders](https://logback.qos.ch/manual/appenders.html#FileAppender) for .e.g Logback seem to create those dirs by default as well:
   
   > If the parent directory of the file does not exist, FileAppender will automatically create it, including any necessary but nonexistent parent directories.




-- 
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: notifications-unsubscribe@logging.apache.org

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



[GitHub] [logging-log4cxx] rm5248 commented on a change in pull request #102: Create intermediate directories for both fixedwindowrollingpolicy and…

Posted by GitBox <gi...@apache.org>.
rm5248 commented on a change in pull request #102:
URL: https://github.com/apache/logging-log4cxx/pull/102#discussion_r785460548



##########
File path: src/main/cpp/rollingpolicybase.cpp
##########
@@ -38,6 +39,7 @@ IMPLEMENT_LOG4CXX_OBJECT(RollingPolicyBase)
 
 RollingPolicyBase::RollingPolicyBase()
 {
+	createIntermediateDirectories = false;

Review comment:
       I had originally had it as `true`, but there's a [test that broke](https://github.com/apache/logging-log4cxx/blob/8988e3e7ced71000e2f1e5c9bd1e282cb766419a/src/test/cpp/rolling/manualrollingtest.cpp#L223) when I did that.  I'm not sure exactly _why_ this test checks for that, but it does.
   
   The [log4j2 appender](https://logging.apache.org/log4j/2.x/manual/appenders.html#FileAppender) does create directories as well.
   
   I think it's perfectly reasonable to change the default to 'true' if you agree.




-- 
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: notifications-unsubscribe@logging.apache.org

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