Skip to content

Commit 2ab802b

Browse files
authored
[dotnet] Add readable timestamps to log in Chromium browsers (#16133)
* [dotnet] Add readable timestamps to log in Chromium browsers * Format script
1 parent f00e838 commit 2ab802b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dotnet/src/webdriver/Chromium/ChromiumDriverService.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ protected ChromiumDriverService(string? executablePath, string? executableFileNa
9595
/// </summary>
9696
public string? AllowedIPAddresses { get; set; }
9797

98+
/// <summary>
99+
/// Adds readable timestamps to log
100+
/// </summary>
101+
public bool ReadableTimestamp { get; set; }
102+
98103
/// <summary>
99104
/// Gets the command-line arguments for the driver service.
100105
/// </summary>
@@ -128,6 +133,11 @@ protected override string CommandLineArguments
128133
argsBuilder.Append(" --append-log");
129134
}
130135

136+
if (this.ReadableTimestamp)
137+
{
138+
argsBuilder.Append(" --readable-timestamp");
139+
}
140+
131141
if (!string.IsNullOrEmpty(this.LogPath))
132142
{
133143
argsBuilder.AppendFormat(CultureInfo.InvariantCulture, " --log-path=\"{0}\"", this.LogPath);

0 commit comments

Comments
 (0)