SIGN IN SIGN UP

[dotnet] Possibility to output internal log messages to file (#13249)

* INitial implementation

* With context

* Update HttpCommandExecutor.cs

* Nullable handlers

* Don't capture logger

* Log message issuer

* Simplify things

* Continue

* Update nunit adapter to work with dotnet 7 and be more friendly with windows

* Rename to LogEventLevel

* Typo

* Introduce LogContextManager

* Typo again

* Rename to Timestamp

* Make ILogger as static field

* Support hierarchical contexts

* Rename to EmitMessage

* Do not emit message to parent context

* Deep copy of loggers and handlers per context

* Make fields private

* Static works with current log context

* Create context with minimum level

* Set minimum level for context

* Rename to WithHandler

* Set minimum level per issuer

* Simplify getting internal logger

* Use DateTimeOffset

* Docs for log event level

* Docs for ILogger

* Docs for Logger

* Docs for others

* Make ILogger interface as internal

* Revert "Make ILogger interface as internal"

This reverts commit 3cf6e489dc5aaaa7dc78a54d22d97230ff6b0b11.

* First test

* Update LogTest.cs

* Fix build error

* Info minimum log level by default

* Remove unnecessary log call in ChromeDriver

* Adjust log levels in console output

* Make it length fixed

* Make webdriver assembly internals visible to tests

* Make ILogger hidden from user

* More tests for log context

* Init

* Rename back to AddHandler

* Make format script happy?

* Make format script happy?

* Rename back to SetLevel

* Console handler by default

* Output logs to stderr

* New api to mange log handlers

* Use logging in DriverFactory

* Revert "Use logging in DriverFactory"

This reverts commit e3255a6217851882ef772165fb01bff1df8c244f.

* Verbose driver creation in tests

* Search driver type in loaded assemblies

* Decalare internals visible to in csproj to not conflict with bazel

* Clean specific assembly name for driver type

* Old school using to make bazel happy

* Fix targeting packs for test targets

* It works

* Small clean up

* Lock in ctor

* Dispose at process exit

* Remove redundant Clone for log handlers

* Dispose log handlers when context finishes

* Lock writing to the disk globally

* Fix new list of log handlers for context

* Don't lock in ctor

* Add docs

* Change format of datetime in file log

* Thread safe disposing

* Add finilizer

* Docs for finilizer

* Add tests

* Recreating missing dirs
N
Nikolay Borisenko committed
b949dcaf4e16f0c60fdffbca91fbde1f452233e1
Parent: 1bcb948
Committed by GitHub <noreply@github.com> on 12/7/2023, 8:33:13 PM