strugerk commented on a change in pull request #703:
URL: https://github.com/apache/logging-log4j2/pull/703#discussion_r785308866



##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/AbstractPathAction.java
##########
@@ -103,7 +103,15 @@ public boolean execute(final FileVisitor<Path> visitor) 
throws IOException {
      * @return the base path (all lookups resolved)
      */
     public Path getBasePath() {
-        return Paths.get(subst.replace(getBasePathString()));
+        Path path = Paths.get(subst.replace(getBasePathString()));
+        if (Files.isSymbolicLink(path)) {
+            try {
+                path = Files.readSymbolicLink(path);
+            } catch (IOException e) {
+                e.printStackTrace();

Review comment:
       ok, I think we should throw out the exception.  
   It's necessary to capture the exception , because this IOException has been 
caught outside.
   The status logger can also be printed when handling exceptions externally




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to