/// <summary>
 /// Create an EventSourceListener to capture and log Durable EventSource
 /// data in Linux.
 /// </summary>
 /// <param name="logger">A LinuxAppService logger configured for the current linux host.</param>
 /// <param name="enableVerbose">If true, durableTask.Core verbose logs are enabled. The opposite if false.</param>
 /// <param name="traceHelper">A tracing client to log exceptions.</param>
 /// <param name="durabilityProviderEventSourceName">The durability provider's event source name.</param>
 public EventSourceListener(LinuxAppServiceLogger logger, bool enableVerbose, EndToEndTraceHelper traceHelper, string durabilityProviderEventSourceName)
 {
     this.logger         = logger;
     this.disableVerbose = !enableVerbose; // We track the opposite value ro simplify logic later
     this.traceHelper    = traceHelper;
     this.durabilityProviderEventSourceName = durabilityProviderEventSourceName;
 }
예제 #2
0
        /// <summary>
        /// Create an EventSourceListener to capture and log Durable EventSource
        /// data in Linux.
        /// </summary>
        /// <param name="logger">A LinuxAppService logger configured for the current linux host.</param>
        /// <param name="enableVerbose">If true, durableTask.Core verbose logs are enabled. The opposite if false.</param>
        /// <param name="traceHelper">A tracing client to log exceptions.</param>
        /// <param name="durabilityProviderEventSourceName">The durability provider's event source name.</param>
        public EventSourceListener(LinuxAppServiceLogger logger, bool enableVerbose, EndToEndTraceHelper traceHelper, string durabilityProviderEventSourceName)
        {
            this.logger         = logger;
            this.disableVerbose = !enableVerbose; // We track the opposite value ro simplify logic later
            this.traceHelper    = traceHelper;
            this.durabilityProviderEventSourceName = durabilityProviderEventSourceName;

            // Check to see if any event sources were created before we knew the event source
            // name for the durability provider and enable that provider.
            var eventSourcesToEnable = this.pendingEventSources.Where(eventSource => eventSource.Name == this.durabilityProviderEventSourceName);

            foreach (var eventSource in eventSourcesToEnable)
            {
                this.EnableEvents(eventSource, EventLevel.LogAlways, EventKeywords.All);
            }

            this.pendingEventSources.Clear();
        }
 /// <summary>
 /// Create an EventSourceListener to capture and log Durable EventSource
 /// data in Linux.
 /// </summary>
 /// <param name="logger">A LinuxAppService logger configured for the current linux host.</param>
 /// <param name="enableVerbose">If true, durableTask.Core verbose logs are enabled. The opposite if false.</param>
 public EventSourceListener(LinuxAppServiceLogger logger, bool enableVerbose)
 {
     this.logger         = logger;
     this.disableVerbose = !enableVerbose; // We set the opposite to simply logic later
 }
 /// <summary>
 /// Create an EventSourceListener to capture and log Durable EventSource
 /// data in Linux.
 /// </summary>
 /// <param name="logger">A LinuxAppService logger configured for the current linux host.</param>
 public EventSourceListener(LinuxAppServiceLogger logger)
 {
     this.logger = logger;
 }
예제 #5
0
 /// <summary>
 /// Create an EventSourceListener to capture and log Durable EventSource
 /// data in Linux.
 /// </summary>
 /// <param name="logger">A LinuxAppService logger configured for the current linux host.</param>
 /// <param name="enableVerbose">If true, durableTask.Core verbose logs are enabled. The opposite if false.</param>
 /// <param name="traceHelper">A tracing client to log exceptions.</param>
 public EventSourceListener(LinuxAppServiceLogger logger, bool enableVerbose, EndToEndTraceHelper traceHelper)
 {
     this.logger         = logger;
     this.disableVerbose = !enableVerbose; // We track the opposite value ro simplify logic later
     this.traceHelper    = traceHelper;
 }