@@ -55,6 +55,11 @@ public class EdgeDriverService extends DriverService {
55
55
*/
56
56
public static final String EDGE_DRIVER_LOG_LEVEL_PROPERTY = "webdriver.edge.loglevel" ;
57
57
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
+
58
63
/**
59
64
* Boolean system property that defines whether the MicrosoftWebDriver executable should be started
60
65
* with verbose logging.
@@ -118,6 +123,7 @@ public static class Builder extends DriverService.Builder<
118
123
EdgeDriverService , EdgeDriverService .Builder > {
119
124
120
125
private final boolean disableBuildCheck = Boolean .getBoolean (EDGE_DRIVER_DISABLE_BUILD_CHECK );
126
+ private boolean appendLog = Boolean .getBoolean (EDGE_DRIVER_APPEND_LOG_PROPERTY );
121
127
private boolean verbose = Boolean .getBoolean (EDGE_DRIVER_VERBOSE_LOG_PROPERTY );
122
128
private String logLevel = System .getProperty (EDGE_DRIVER_LOG_LEVEL_PROPERTY );
123
129
private boolean silent = Boolean .getBoolean (EDGE_DRIVER_SILENT_OUTPUT_PROPERTY );
@@ -143,6 +149,17 @@ public int score(Capabilities capabilities) {
143
149
return score ;
144
150
}
145
151
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
+
146
163
/**
147
164
* Configures the driver server verbosity.
148
165
*
@@ -223,6 +240,9 @@ protected List<String> createArgs() {
223
240
if (getLogFile () != null ) {
224
241
args .add (String .format ("--log-path=%s" , getLogFile ().getAbsolutePath ()));
225
242
}
243
+ if (appendLog ) {
244
+ args .add ("--append-log" );
245
+ }
226
246
if (logLevel != null ) {
227
247
args .add (String .format ("--log-level=%s" , logLevel ));
228
248
}
0 commit comments