/// <summary> /// Initializes the configuration. /// </summary> /// <param name="component">The component name.</param> /// <returns>Async task</returns> private async Task InitializeConfig(Component component) { this.component = component; await Tracer.Debug(string.Format("Start initializing tracing for component '{0}'", component)); // load the config async, so the client can start in this time var config = await this.proxy.GetConfigAsync(); this.logLevel = config.LogLevel; this.messageRetentionCount = config.MessageRetentionCount; this.isInitialized = true; await Tracer.Info(string.Format("Tracer for component '{0}' has been initialized", component)); }
/// <summary> /// Initializes the tracer and load the configuration. /// </summary> /// <param name="component">The component name.</param> /// <returns>Async task</returns> public static async Task Initialize(Component component) { await Current.InitializeConfig(component); }