aboutsummaryrefslogtreecommitdiffstats
path: root/container-accesslogging
diff options
context:
space:
mode:
authorHÃ¥kon Hallingstad <hakon.hallingstad@gmail.com>2020-12-08 09:51:34 +0100
committerGitHub <noreply@github.com>2020-12-08 09:51:34 +0100
commit3fe6c013b9bf8a4e84abc25c0ec1823d34d8b06a (patch)
treec90bad9d7251762529e49c5d1b89bad8f377591a /container-accesslogging
parent30b10b467812db9ed63ac29292ae44bc76cf5101 (diff)
Revert "Revert "Simplify symlink""
Diffstat (limited to 'container-accesslogging')
-rw-r--r--container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java b/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java
index ab246a21a43..75e9febc192 100644
--- a/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java
+++ b/container-accesslogging/src/main/java/com/yahoo/container/logging/LogFileHandler.java
@@ -298,14 +298,7 @@ public class LogFileHandler extends StreamHandler {
if (symlinkName == null) return;
File f = new File(fileName);
File f2 = new File(f.getParent(), symlinkName);
- String canonicalPath;
- try {
- canonicalPath = f.getCanonicalPath();
- } catch (IOException e) {
- logger.warning("Got '" + e + "' while doing f.getCanonicalPath() on file '" + f.getPath() + "'.");
- return;
- }
- String [] cmd = new String[]{"/bin/ln", "-sf", canonicalPath, f2.getPath()};
+ String [] cmd = new String[]{"/bin/ln", "-sf", f.getName(), f2.getPath()};
try {
int retval = new ProcessExecuter().exec(cmd).getFirst();
// Detonator pattern: Think of all the fun we can have if ln isn't what we