// <auto-generated/>
#nullable enable
namespace Microsoft.Extensions.ServiceDiscovery.Dns
{
partial class DnsServiceEndpointProviderBase
{
partial class Log
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.String, global::System.String, global::System.Exception?> __SrvQueryCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.String, global::System.String>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(1, "SrvQuery"), "Resolving endpoints for service '{ServiceName}' using DNS SRV lookup for name '{RecordName}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void SrvQuery(global::Microsoft.Extensions.Logging.ILogger logger, global::System.String serviceName, global::System.String recordName)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
__SrvQueryCallback(logger, serviceName, recordName, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.String, global::System.String, global::System.Exception?> __AddressQueryCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.String, global::System.String>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(2, "AddressQuery"), "Resolving endpoints for service '{ServiceName}' using host lookup for name '{RecordName}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void AddressQuery(global::Microsoft.Extensions.Logging.ILogger logger, global::System.String serviceName, global::System.String recordName)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
__AddressQueryCallback(logger, serviceName, recordName, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.String, global::System.String, global::System.Exception?> __SkippedResolutionCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.String, global::System.String>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(3, "SkippedResolution"), "Skipping endpoint resolution for service '{ServiceName}': '{Reason}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void SkippedResolution(global::Microsoft.Extensions.Logging.ILogger logger, global::System.String serviceName, global::System.String reason)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
__SkippedResolutionCallback(logger, serviceName, reason, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.String, global::System.Exception?> __ServiceNameIsNotUriOrDnsNameCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.String>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(4, "ServiceNameIsNotUriOrDnsName"), "Service name '{ServiceName}' is not a valid URI or DNS name.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void ServiceNameIsNotUriOrDnsName(global::Microsoft.Extensions.Logging.ILogger logger, global::System.String serviceName)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
__ServiceNameIsNotUriOrDnsNameCallback(logger, serviceName, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.String, global::System.Exception?> __NoDnsSuffixFoundCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.String>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(5, "NoDnsSuffixFound"), "DNS SRV query cannot be constructed for service name '{ServiceName}' because no DNS namespace was configured or detected.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void NoDnsSuffixFound(global::Microsoft.Extensions.Logging.ILogger logger, global::System.String serviceName)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
__NoDnsSuffixFoundCallback(logger, serviceName, null);
}
}
}
}
}
namespace Microsoft.Extensions.ServiceDiscovery.Dns.Resolver
{
partial class DnsResolver
{
partial class Log
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __QueryCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(1, "Query"), "Resolving {QueryType} {QueryName} on {Server} attempt {Attempt}", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void Query(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
__QueryCallback(logger, queryType, queryName, server, attempt, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __ResultTruncatedCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(2, "ResultTruncated"), "Result truncated for {QueryType} {QueryName} from {Server} attempt {Attempt}. Restarting over TCP", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void ResultTruncated(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
__ResultTruncatedCallback(logger, queryType, queryName, server, attempt, null);
}
}
/// <summary> This API supports the logging infrastructure and is not intended to be used directly from your code. It is subject to change in the future. </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private readonly struct __ErrorResponseCodeStruct : global::System.Collections.Generic.IReadOnlyList<global::System.Collections.Generic.KeyValuePair<string, object?>>
{
private readonly global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType _queryType;
private readonly global::System.String _queryName;
private readonly global::System.Net.IPEndPoint _server;
private readonly global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode _responseCode;
public __ErrorResponseCodeStruct(global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode responseCode)
{
this._queryType = queryType;
this._queryName = queryName;
this._server = server;
this._responseCode = responseCode;
}
public override string ToString()
{
var Server = this._server;
var ResponseCode = this._responseCode;
var QueryType = this._queryType;
var QueryName = this._queryName;
return $"Server {Server} replied with {ResponseCode} when querying {QueryType} {QueryName}";
}
public static readonly global::System.Func<__ErrorResponseCodeStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
public int Count => 5;
public global::System.Collections.Generic.KeyValuePair<string, object?> this[int index]
{
get => index switch
{
0 => new global::System.Collections.Generic.KeyValuePair<string, object?>("QueryType", this._queryType),
1 => new global::System.Collections.Generic.KeyValuePair<string, object?>("QueryName", this._queryName),
2 => new global::System.Collections.Generic.KeyValuePair<string, object?>("Server", this._server),
3 => new global::System.Collections.Generic.KeyValuePair<string, object?>("ResponseCode", this._responseCode),
4 => new global::System.Collections.Generic.KeyValuePair<string, object?>("{OriginalFormat}", "Server {Server} replied with {ResponseCode} when querying {QueryType} {QueryName}"),
_ => throw new global::System.IndexOutOfRangeException(nameof(index)), // return the same exception LoggerMessage.Define returns in this case
};
}
public global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<string, object?>> GetEnumerator()
{
for (int i = 0; i < 5; i++)
{
yield return this[i];
}
}
global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void ErrorResponseCode(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode responseCode)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Error))
{
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new global::Microsoft.Extensions.Logging.EventId(3, "ErrorResponseCode"),
new __ErrorResponseCodeStruct(queryType, queryName, server, responseCode),
null,
__ErrorResponseCodeStruct.Format);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __TimeoutCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(4, "Timeout"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} timed out.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void Timeout(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
__TimeoutCallback(logger, queryType, queryName, server, attempt, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NoDataCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(5, "NoData"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt}: no data matching given query type.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void NoData(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
__NoDataCallback(logger, queryType, queryName, server, attempt, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NameErrorCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(6, "NameError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt}: server indicates given name does not exist.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void NameError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
__NameErrorCallback(logger, queryType, queryName, server, attempt, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __MalformedResponseCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(7, "MalformedResponse"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed to return a valid DNS response.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void MalformedResponse(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
__MalformedResponseCallback(logger, queryType, queryName, server, attempt, null);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NetworkErrorCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(8, "NetworkError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed due to a network error.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void NetworkError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt, global::System.Exception exception)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
__NetworkErrorCallback(logger, queryType, queryName, server, attempt, exception);
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __QueryErrorCallback =
global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(9, "QueryError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Logging.Generators", "8.0.12.6609")]
public static partial void QueryError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt, global::System.Exception exception)
{
if (logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Error))
{
__QueryErrorCallback(logger, queryType, queryName, server, attempt, exception);
}
}
}
}
}