-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set logfile name/path for QuarkusTests #10202
Comments
cc @tkalmar & @harthorst |
I guess that explains it: But why? cc @geoand |
An oversight most likely. #10205 should fix the issue (for system properties, for |
Oh wow, very quick PR. Thanks! Do see any chance to make it work for app properties as well? |
Yeah, we probably could make it work, but it's more work that I am not sure is worth the trouble 😁 |
Ensure that a set quarkus.log.file.path system prop is used in tests
Thanks for (partially) fixing it!
The thing is that I lost time trying to figure out what is going on and this might also happen to others. |
Just wanted to confirm that the system property is now working as expected. We are creating a <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<quarkus.log.file.path>quarkus-test-${surefire.forkNumber}.log</quarkus.log.file.path>
</systemPropertyVariables>
</configuration>
</plugin> |
👍 |
Describe the bug
When executing tests (via maven surefire),
quarkus.log.file.enable=true
(via-D
orapplication.properties
/.yaml
) enables logging totarget/quarkus.log
(default). So far so good.But setting
quarkus.log.file.path=quarkus-test.log
has no effect, Quarkus always seems to log toquarkus.log
for tests.Expected behavior
quarkus.log.file.path
shoul be picked up just as it is being picked up in dev-mode etc.Actual behavior
When file logging is activated, test always log to
quarkus.log
, not the configured file.To Reproduce
Steps to reproduce the behavior:
cd getting-started
mvn clean test -Dquarkus.log.file.enable=true -Dquarkus.log.file.path=quarkus-test.log
(or create a correspondingapplication.properties
)Configuration
Screenshots
n/a
Environment (please complete the following information):
uname -a
orver
:MINGW64_NT-10.0-18363 XXX 3.0.7-338.x86_64 2019-11-21 23:07 UTC x86_64 Msys
java -version
:1.4.2.Final
or1.5.2.Final
mvnw --version
orgradlew --version
):Apache Maven 3.6.3
Additional context
quarkus.log.file.rotation.file-suffix: .yyyy-MM-dd
seems to work as expected.The text was updated successfully, but these errors were encountered: