Skip to content

Commit

Permalink
[java] Ack the log file argument without need to combine it
Browse files Browse the repository at this point in the history
Fixes #12225
  • Loading branch information
diemol committed Jun 21, 2023
1 parent 235bc94 commit a04a22f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions java/src/org/openqa/selenium/chrome/ChromeDriverService.java
Expand Up @@ -378,7 +378,7 @@ protected List<String> createArgs() {

// Readable timestamp and append logs only work if a file is specified
// Can only get readable logs via arguments; otherwise send service output as directed
if (getLogFile() != null && (readableTimestamp || appendLog)) {
if (getLogFile() != null) {
args.add(String.format("--log-path=%s", getLogFile().getAbsolutePath()));
if (readableTimestamp != null && readableTimestamp.equals(Boolean.TRUE)) {
args.add("--readable-timestamp");
Expand All @@ -392,12 +392,6 @@ protected List<String> createArgs() {
if (logLevel != null) {
args.add(String.format("--log-level=%s", logLevel.toString().toUpperCase()));
}
// if (silent != null && silent.equals(Boolean.TRUE)) {
// args.add("--silent");
// }
// if (verbose != null && verbose.equals(Boolean.TRUE)) {
// args.add("--verbose");
// }
if (allowedListIps != null) {
args.add(String.format("--allowed-ips=%s", allowedListIps));
}
Expand Down
2 changes: 1 addition & 1 deletion java/src/org/openqa/selenium/edge/EdgeDriverService.java
Expand Up @@ -314,7 +314,7 @@ protected List<String> createArgs() {

// Readable timestamp and append logs only work if a file is specified
// Can only get readable logs via arguments; otherwise send service output as directed
if (getLogFile() != null && (readableTimestamp || appendLog)) {
if (getLogFile() != null) {
args.add(String.format("--log-path=%s", getLogFile().getAbsolutePath()));
if (readableTimestamp != null && readableTimestamp.equals(Boolean.TRUE)) {
args.add("--readable-timestamp");
Expand Down

0 comments on commit a04a22f

Please sign in to comment.