@@ -55,6 +55,11 @@ public class EdgeDriverService extends DriverService {
5555 */
5656 public static final String EDGE_DRIVER_LOG_LEVEL_PROPERTY = "webdriver.edge.loglevel" ;
5757
58+ /**
59+ * Boolean system property that defines whether MSEdgeDriver should append to existing log file.
60+ */
61+ public static final String EDGE_DRIVER_APPEND_LOG_PROPERTY = "webdriver.edge.appendLog" ;
62+
5863 /**
5964 * Boolean system property that defines whether the MicrosoftWebDriver executable should be started
6065 * with verbose logging.
@@ -118,6 +123,7 @@ public static class Builder extends DriverService.Builder<
118123 EdgeDriverService , EdgeDriverService .Builder > {
119124
120125 private final boolean disableBuildCheck = Boolean .getBoolean (EDGE_DRIVER_DISABLE_BUILD_CHECK );
126+ private boolean appendLog = Boolean .getBoolean (EDGE_DRIVER_APPEND_LOG_PROPERTY );
121127 private boolean verbose = Boolean .getBoolean (EDGE_DRIVER_VERBOSE_LOG_PROPERTY );
122128 private String logLevel = System .getProperty (EDGE_DRIVER_LOG_LEVEL_PROPERTY );
123129 private boolean silent = Boolean .getBoolean (EDGE_DRIVER_SILENT_OUTPUT_PROPERTY );
@@ -143,6 +149,17 @@ public int score(Capabilities capabilities) {
143149 return score ;
144150 }
145151
152+ /**
153+ * Configures the driver server appending to log file.
154+ *
155+ * @param appendLog True for appending to log file, false otherwise.
156+ * @return A self reference.
157+ */
158+ public EdgeDriverService .Builder withAppendLog (boolean appendLog ) {
159+ this .appendLog = appendLog ;
160+ return this ;
161+ }
162+
146163 /**
147164 * Configures the driver server verbosity.
148165 *
@@ -223,6 +240,9 @@ protected List<String> createArgs() {
223240 if (getLogFile () != null ) {
224241 args .add (String .format ("--log-path=%s" , getLogFile ().getAbsolutePath ()));
225242 }
243+ if (appendLog ) {
244+ args .add ("--append-log" );
245+ }
226246 if (logLevel != null ) {
227247 args .add (String .format ("--log-level=%s" , logLevel ));
228248 }
0 commit comments