Skip to content

Commit

Permalink
[dotnet] Added troubleshooting logging docs (#1559)
Browse files Browse the repository at this point in the history
[deploy site]
  • Loading branch information
nvborisenko authored Jan 23, 2024
1 parent fbb9379 commit 50f3836
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ level module. So to work with all loggers in selenium module, you can do this:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L5" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logger is managed with a static class, so all access to logging is managed simply by referencing `Log` from the `OpenQA.Selenium.Internal.Logging` namespace.
{{% /tab %}}
{{% tab header="Ruby" %}}
If you want to see as much debugging as possible in all the classes,
Expand Down Expand Up @@ -93,9 +91,10 @@ logging.basicConfig(level=logging.WARN)
```
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET has 6 logger levels: `Error`, `Warn`, `Info`, `Debug`, `Trace` and `None`. The default level is `Info`.

To change the level of the logger:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L18" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby logger has 5 logger levels: `:debug`, `:info`, `:warn`, `:error`, `:fatal`.
Expand Down Expand Up @@ -147,8 +146,11 @@ WARNING selenium:test_logging.py:23 this is a warning
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs actionable content at logger level `Warn`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 WARN LoggingTest: this is a warning
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -193,8 +195,11 @@ INFO selenium:test_logging.py:22 this is useful information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs useful information at logger level `Info`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 INFO LoggingTest: this is useful information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -237,8 +242,11 @@ DEBUG selenium:test_logging.py:24 this is detailed debug information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs most debug content at logger level `Debug`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 DEBUG LoggingTest: this is detailed debug information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -273,9 +281,8 @@ handler with either a `StreamHandler` or a `FileHandler`:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L9-L10" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
By default all logs are sent to `System.Console.Error` output. To direct output somewhere else, you need to add a handler with a `FileLogHandler`:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L20" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
By default, logs are sent to the console in `stdout`.
Expand Down Expand Up @@ -312,9 +319,8 @@ different levels for different modules:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L12-L13" >}}
{{< /tab >}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logging is managed on a per class level, set the level you want to use on a per-class basis:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L22-L23" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby's logger allows you to opt in ("allow") or opt out ("ignore") of log messages based on their IDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ level module. So to work with all loggers in selenium module, you can do this:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L5" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logger is managed with a static class, so all access to logging is managed simply by referencing `Log` from the `OpenQA.Selenium.Internal.Logging` namespace.
{{% /tab %}}
{{% tab header="Ruby" %}}
If you want to see as much debugging as possible in all the classes,
Expand Down Expand Up @@ -92,9 +90,10 @@ logging.basicConfig(level=logging.WARN)
```
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET has 6 logger levels: `Error`, `Warn`, `Info`, `Debug`, `Trace` and `None`. The default level is `Info`.

To change the level of the logger:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L18" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby logger has 5 logger levels: `:debug`, `:info`, `:warn`, `:error`, `:fatal`.
Expand Down Expand Up @@ -145,8 +144,11 @@ WARNING selenium:test_logging.py:23 this is a warning
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs actionable content at logger level `Warn`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 WARN LoggingTest: this is a warning
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -191,8 +193,11 @@ INFO selenium:test_logging.py:22 this is useful information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs useful information at logger level `Info`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 INFO LoggingTest: this is useful information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -235,8 +240,11 @@ DEBUG selenium:test_logging.py:24 this is detailed debug information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs most debug content at logger level `Debug`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 DEBUG LoggingTest: this is detailed debug information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -271,9 +279,8 @@ handler with either a `StreamHandler` or a `FileHandler`:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L9-L10" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
By default all logs are sent to `System.Console.Error` output. To direct output somewhere else, you need to add a handler with a `FileLogHandler`:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L20" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
By default, logs are sent to the console in `stdout`.
Expand Down Expand Up @@ -309,9 +316,8 @@ different levels for different modules:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L12-L13" >}}
{{< /tab >}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logging is managed on a per class level, set the level you want to use on a per-class basis:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L22-L23" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby's logger allows you to opt in ("allow") or opt out ("ignore") of log messages based on their IDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ level module. So to work with all loggers in selenium module, you can do this:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L5" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logger is managed with a static class, so all access to logging is managed simply by referencing `Log` from the `OpenQA.Selenium.Internal.Logging` namespace.
{{% /tab %}}
{{% tab header="Ruby" %}}
If you want to see as much debugging as possible in all the classes,
Expand Down Expand Up @@ -92,9 +90,10 @@ logging.basicConfig(level=logging.WARN)
```
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET has 6 logger levels: `Error`, `Warn`, `Info`, `Debug`, `Trace` and `None`. The default level is `Info`.

To change the level of the logger:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L18" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby logger has 5 logger levels: `:debug`, `:info`, `:warn`, `:error`, `:fatal`.
Expand Down Expand Up @@ -145,8 +144,11 @@ WARNING selenium:test_logging.py:23 this is a warning
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs actionable content at logger level `Warn`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 WARN LoggingTest: this is a warning
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -191,8 +193,11 @@ INFO selenium:test_logging.py:22 this is useful information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs useful information at logger level `Info`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 INFO LoggingTest: this is useful information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -235,8 +240,11 @@ DEBUG selenium:test_logging.py:24 this is detailed debug information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs most debug content at logger level `Debug`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 DEBUG LoggingTest: this is detailed debug information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -271,9 +279,8 @@ handler with either a `StreamHandler` or a `FileHandler`:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L9-L10" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
By default all logs are sent to `System.Console.Error` output. To direct output somewhere else, you need to add a handler with a `FileLogHandler`:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L20" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
By default, logs are sent to the console in `stdout`.
Expand Down Expand Up @@ -309,9 +316,8 @@ different levels for different modules:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L12-L13" >}}
{{< /tab >}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logging is managed on a per class level, set the level you want to use on a per-class basis:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L22-L23" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby's logger allows you to opt in ("allow") or opt out ("ignore") of log messages based on their IDs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ level module. So to work with all loggers in selenium module, you can do this:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L5" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logger is managed with a static class, so all access to logging is managed simply by referencing `Log` from the `OpenQA.Selenium.Internal.Logging` namespace.
{{% /tab %}}
{{% tab header="Ruby" %}}
If you want to see as much debugging as possible in all the classes,
Expand Down Expand Up @@ -95,9 +93,10 @@ logging.basicConfig(level=logging.WARN)
```
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET has 6 logger levels: `Error`, `Warn`, `Info`, `Debug`, `Trace` and `None`. The default level is `Info`.

To change the level of the logger:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L18" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby logger has 5 logger levels: `:debug`, `:info`, `:warn`, `:error`, `:fatal`.
Expand Down Expand Up @@ -149,8 +148,11 @@ WARNING selenium:test_logging.py:23 this is a warning
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs actionable content at logger level `Warn`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 WARN LoggingTest: this is a warning
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -195,8 +197,11 @@ INFO selenium:test_logging.py:22 this is useful information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs useful information at logger level `Info`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 INFO LoggingTest: this is useful information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -239,8 +244,11 @@ DEBUG selenium:test_logging.py:24 this is detailed debug information
```
{{% /tab %}}
{{% tab header="CSharp" %}}
.NET logs most debug content at logger level `Debug`.

Example:
```text
.NET does not currently have a Logging implementation
11:04:40.986 DEBUG LoggingTest: this is detailed debug information
```
{{% /tab %}}
{{% tab header="Ruby" %}}
Expand Down Expand Up @@ -277,9 +285,8 @@ handler with either a `StreamHandler` or a `FileHandler`:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L9-L10" >}}
{{% /tab %}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
By default all logs are sent to `System.Console.Error` output. To direct output somewhere else, you need to add a handler with a `FileLogHandler`:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L20" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
By default, logs are sent to the console in `stdout`.
Expand Down Expand Up @@ -316,9 +323,8 @@ different levels for different modules:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L12-L13" >}}
{{< /tab >}}
{{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
.NET logging is managed on a per class level, set the level you want to use on a per-class basis:
{{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs#L22-L23" >}}
{{% /tab %}}
{{% tab header="Ruby" %}}
Ruby's logger allows you to opt in ("allow") or opt out ("ignore") of log messages based on their IDs.
Expand Down

0 comments on commit 50f3836

Please sign in to comment.