public void CreateClient_PoolingDisabled_ClientCreated()
        {
            Init();

            using (var client = FlumeClientFactory.CreateClient())
            {
                Assert.IsNotNull(client);
            }
        }
Example #2
0
        protected override void Append(LoggingEvent logEvent)
        {
            if (logEvent.Level == Level.Off)
            {
                return;
            }

            string formattedText    = RenderLoggingEvent(logEvent);
            var    nLogEventAdapter = new Log4NetEventAdapter(formattedText, logEvent);

            var client = FlumeClientFactory.CreateClient(Client, Host, Port);

            client.Append(nLogEventAdapter);
        }
Example #3
0
        protected override void Write(LogEventInfo logEvent)
        {
            if (logEvent.Level == LogLevel.Off)
            {
                return;
            }

            string formattedText    = Layout.Render(logEvent);
            var    nLogEventAdapter = new NLogEventAdapter(formattedText, logEvent);

            var client = FlumeClientFactory.CreateClient(Client, Host, Port);

            client.Append(nLogEventAdapter);
        }
Example #4
0
        protected override void OnClose()
        {
            FlumeClientFactory.Close();

            base.OnClose();
        }
Example #5
0
        public override void ActivateOptions()
        {
            FlumeClientFactory.Init(Client, Host, Port);

            base.ActivateOptions();
        }
 public void Init_ValidParameters_Succeeds()
 {
     FlumeClientFactory.Init(ClientType.Thrift, "localhost", 9090);
 }
 public void Init_HostNull_ThrowsArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(
         () => FlumeClientFactory.Init(ClientType.Thrift, null, 9090));
 }
// ReSharper restore NotAccessedField.Local

        private static void Init()
        {
            FlumeClientFactory.Init(ClientType.Thrift, "localhost", 9090);
        }
Example #9
0
        protected override void CloseTarget()
        {
            FlumeClientFactory.Close();

            base.CloseTarget();
        }
Example #10
0
        protected override void InitializeTarget()
        {
            FlumeClientFactory.Init(Client, Host, Port);

            base.InitializeTarget();
        }