Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 2.0.7
-
Fix Version/s: None
-
Component/s: Design, Patterns & Best Practices, Logging, POM, POM::Encoding, Profiles
-
Labels:None
-
Number of attachments :
Description
Using log4j.xml I tried to use the resource filtering mechanism of Maven2 to write log files to the directory:
$
{basedir}/logs(in windows)
In the end the log files indeed do end up in the project directory, but not the ./log directory.
Also the name of the log file becomes the path with all of the '\' (${file.seprator}'s taken out of it:
For instance if the path to my log file was:
"C:\dev\workspace\project\logs\project-1.0-dev_test.log"
My log file would appear in ${basedir}
and be called:
"devworkspaceprojectlogsproject-1.0-dev_test.log"
Thank you,
Andrew J. Leer
Issue Links
- relates to
-
MNG-4713
${basedir} variable makes portable builds overly difficult
-
1. |
Create a variable called ${basedir.log4j} | |
|
Unassigned |
Hi,
{basedir}Log4j loads its arguments as java.util.Properties (even if they are in a XML file). '\' is used as an escape parameters in Properties so you have to use '
' instead. What you propose would only postpone the problem because if you want to write to another directory $
/../logs for example it would fail the same way :o(.
Handling path with properties is quite annoying when you want to be cross-platform
Emmanuel