Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
using System.Text;
using System.IO;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.Json;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Configuration;

namespace Azure.Sdk.Tools.TestProxy.Common
{
Expand Down Expand Up @@ -40,7 +34,7 @@ public static void ConfigureLogger(ILoggerFactory factory)
{
if (Logger == null && factory != null)
{
Logger = factory.CreateLogger("DebugLogging");
Logger = factory.CreateLogger("Azure.Sdk.Tools.TestProxy");
Copy link
Member Author

@JoshLove-msft JoshLove-msft Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generic CreateLogger<T> method doesn't work with static classes, so can't use:
CreateLogger<DebugLogger>()

}
}

Expand Down
9 changes: 5 additions & 4 deletions tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,11 @@ test-proxy -- --urls "http://localhost:9000;https://localhost:9001"

The test-proxy is integrated with the following environment variables.

| Variable | Usage |
|---|---|
| `TEST_PROXY_FOLDER` | if command-line argument `storage-location` is not provided when invoking the proxy, this environment variable is also checked for a valid directory to use as test-proxy context. |
| `Logging__LogLevel__Default` | Defaults to `Information`. Possible valid values are `Information`, `Warning`, `Error`, `Critical`. |
| Variable | Usage |
|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `TEST_PROXY_FOLDER` | if command-line argument `storage-location` is not provided when invoking the proxy, this environment variable is also checked for a valid directory to use as test-proxy context. |
| `Logging__LogLevel__Default` | Defaults to `Information`. Possible valid values are <br/><br/>`Debug`, `Information`, `Warning`, `Error`, `Critical`.<br><br>Do not set for .NET test runs as it would cause the tests *themselves* to start emitting logs.|
| `Logging__LogLevel__Azure.Sdk.Tools.TestProxy`| Set to `Debug` to see request level logs emitted by the Test Proxy.|

Both of the above variables can be set in the `docker` runtime by providing additional arguments EG: `docker run -e Logging__LogLevel__Default=Warning azsdkengsys.azurecr.io/engsys/test-proxy:latest`. For multiple environment variables, just use multiple `-e` provisions.

Expand Down