Beispiel #1
0
 public NatsSink(
     NatsConfiguration configuration,
     ITextFormatter formatter) : base(configuration.BatchPostingLimit, configuration.Period)
 {
     _formatter = formatter ?? new CompactJsonFormatter();
     _client    = new NatsLogClient(configuration);
 }
Beispiel #2
0
        /// <summary>
        /// Constructor for NatsLogClient
        /// </summary>
        /// <param name="configuration">mandatory</param>
        public NatsLogClient(NatsConfiguration configuration)
        {
            // load configuration
            _config  = configuration;
            _subject = configuration.Subject;

            // initialize
            InitializeEndpoint();
        }