修复 工单第一次连接失败bug
增加工单内log
This commit is contained in:
1 parent
324ca0c6e7
commit
6e5dfa92b8
11 files changed
+566
-560
No files matched your search
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using WxOrder.Framework.Helpers;
|
||||
|
||||
namespace LaunchDarkly.EventSource
|
||||
{
|
||||
@@ -30,6 +31,7 @@ namespace LaunchDarkly.EventSource
|
||||
internal TimeSpan _initialRetryDelay = Configuration.DefaultInitialRetryDelay;
|
||||
internal TimeSpan _backoffResetThreshold = Configuration.DefaultBackoffResetThreshold;
|
||||
internal string _lastEventId;
|
||||
internal ILogger _logger;
|
||||
internal IDictionary<string, string> _requestHeaders = new Dictionary<string, string>();
|
||||
internal HttpMessageHandler _httpMessageHandler;
|
||||
internal HttpClient _httpClient;
|
||||
@@ -230,45 +232,6 @@ namespace LaunchDarkly.EventSource
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the logging implementation to be used for all EventSource log output.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This uses the <c>ILogAdapter</c> abstraction from the <c>LaunchDarkly.Logging</c> library,
|
||||
/// which provides several basic implementations such as <c>Logs.ToConsole</c> and an integration
|
||||
/// with the .NET Core logging framework. For more about this and about adapters to other logging
|
||||
/// frameworks, see <a href="https://github.com/launchdarkly/dotnet-logging"><c>LaunchDarkly.Logging</c></a>.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <c>LaunchDarkly.Logging</c> defines logging levels of Debug, Info, Warn, and Error. If you do not
|
||||
/// want detailed Debug-level logging, use the <c>Level()</c> modifier to set a minimum level of Info
|
||||
/// or above, as shown in the code example (unless you are using an adapter to another logging
|
||||
/// framework that has its own way of doing log filtering).
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Log messages will use <see cref="Configuration.DefaultLoggerName"/> as the logger name. If you
|
||||
/// want to specify a different logger name, use <see cref="Logger(Logging.Logger)"/>.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If you don't specify <see cref="LogAdapter(ILogAdapter)"/> or <see cref="Logger(Logging.Logger)"/>,
|
||||
/// EventSource will not do any logging.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <example>
|
||||
/// using LaunchDarkly.Logging;
|
||||
///
|
||||
/// // Send log output to the console (standard error), suppressing Debug messages
|
||||
/// var config = new ConfigurationBuilder(uri).
|
||||
/// LogAdapter(Logs.ToConsole.Level(LogLevel.Info)).
|
||||
/// Build();
|
||||
/// </example>
|
||||
/// <param name="logAdapter">a <c>LaunchDarkly.Logging.ILogAdapter</c></param>
|
||||
/// <returns>the builder</returns>
|
||||
public ConfigurationBuilder LogAdapter()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a custom logger to be used for all EventSource log output.
|
||||
@@ -297,8 +260,9 @@ namespace LaunchDarkly.EventSource
|
||||
/// </example>
|
||||
/// <param name="logger">a <c>LaunchDarkly.Logging.Logger</c> instance</param>
|
||||
/// <returns>the builder</returns>
|
||||
public ConfigurationBuilder Logger()
|
||||
public ConfigurationBuilder Logger(ILogger logger)
|
||||
{
|
||||
_logger = logger;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user