diff --git a/dotnet/src/webdriver/Chrome/ChromeDriverService.cs b/dotnet/src/webdriver/Chrome/ChromeDriverService.cs index 0452af5772379..7a9fc8275f390 100644 --- a/dotnet/src/webdriver/Chrome/ChromeDriverService.cs +++ b/dotnet/src/webdriver/Chrome/ChromeDriverService.cs @@ -37,6 +37,7 @@ public sealed class ChromeDriverService : DriverService private string whitelistedIpAddresses = string.Empty; private int adbPort = -1; private bool enableVerboseLogging; + private bool enableAppendLog; /// /// Initializes a new instance of the class. @@ -95,6 +96,16 @@ public bool EnableVerboseLogging set { this.enableVerboseLogging = value; } } + /// + /// Gets or sets a value indicating whether to enable appending to an existing ChromeDriver log file. + /// Defaults to . + /// + public bool EnableAppendLog + { + get { return this.enableAppendLog; } + set { this.enableAppendLog = value; } + } + /// /// Gets or sets the comma-delimited list of IP addresses that are approved to /// connect to this instance of the Chrome driver. Defaults to an empty string, @@ -129,6 +140,11 @@ protected override string CommandLineArguments argsBuilder.Append(" --verbose"); } + if (this.enableAppendLog) + { + argsBuilder.Append(" --append-log"); + } + if (!string.IsNullOrEmpty(this.logPath)) { argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --log-path=\"{0}\"", this.logPath);