Skip to content

Commit

Permalink
Merge pull request #10205 from geoand/#10202
Browse files Browse the repository at this point in the history
Ensure that a set quarkus.log.file.path system prop is used in tests
  • Loading branch information
geoand authored Jun 24, 2020
2 parents 16423f8 + 395ccad commit 92555d4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@

public class PropertyTestUtil {

private static final String LOG_FILE_PATH_PROPERTY = "quarkus.log.file.path";

public static void setLogFileProperty() {
System.setProperty("quarkus.log.file.path", getLogFileLocation());
System.setProperty(LOG_FILE_PATH_PROPERTY, getLogFileLocation());
}

public static void setLogFileProperty(String logFileName) {
System.setProperty("quarkus.log.file.path", getLogFileLocation(logFileName));
System.setProperty(LOG_FILE_PATH_PROPERTY, getLogFileLocation(logFileName));
}

public static String getLogFileLocation() {
return getLogFileLocation(FileConfig.DEFAULT_LOG_FILE_NAME);
return getLogFileLocation(System.getProperty(LOG_FILE_PATH_PROPERTY, FileConfig.DEFAULT_LOG_FILE_NAME));
}

private static String getLogFileLocation(String logFileName) {
Expand Down

0 comments on commit 92555d4

Please sign in to comment.