Example #1
0
        /// <summary>
        /// Create an instance.
        /// </summary>
        /// <param name="hostConfiguration"></param>
        /// <param name="formattingConfiguration"></param>
        /// <param name="logSubscribers"></param>
        public RxLoggerConfiguration(HostConfiguration hostConfiguration, LogFormattingConfiguration formattingConfiguration,
                                     IEnumerable <Func <RxLoggerConfiguration, IObservable <RxLogEntry>, IObservable <Unit> > > logSubscribers)
        {
            Guard.NotNull(hostConfiguration, nameof(hostConfiguration));
            Guard.NotNull(formattingConfiguration, nameof(formattingConfiguration));
            Guard.NotNull(logSubscribers, nameof(logSubscribers));

            Host       = hostConfiguration;
            Formatting = formattingConfiguration;

            AddSubscribers(logSubscribers);
        }
Example #2
0
 /// <summary>
 /// Create a configuration with a specified <see cref="HostConfiguration"/> and subscribers
 /// </summary>
 /// <param name="hostConfiguration"></param>
 /// <param name="logSubscribers"></param>
 /// <returns></returns>
 public static RxLoggerConfiguration Create(HostConfiguration hostConfiguration, params Func <RxLoggerConfiguration, IObservable <RxLogEntry>, IObservable <Unit> >[] logSubscribers)
 {
     return(Create(hostConfiguration, null, logSubscribers));
 }