public void LoggingTest() { var server = new DummyServer(); var task = server.Run(24224); var properties = new NameValueCollection(); LogManager.Adapter = new FluentLoggerFactoryAdapter(properties); var logger = LogManager.GetCurrentClassLogger(); logger.Debug("test"); var ret = task.Result; Utils.Unpack(ret).Is(@"[ ""Fluent.Fluent.Test.FluentLoggerTest"", [ [ 1360421509.813, { ""Level"" : ""DEBUG"", ""Message"" : ""test"" } ] ] ]"); }
public void SendMessage() { var server = new DummyServer(); var task = server.Run(24224); var date = MessagePackConvert.ToDateTime(1360370224238); using (var sender = FluentSender.CreateSync("app").Result) { sender.EmitWithTimeAsync("hoge", date, new { message = "hoge" }); } var ret = task.Result; Utils.Unpack(ret).Is(@"[ ""app.hoge"", [ [ 1360370224.238, { ""message"" : ""hoge"" } ] ] ]"); }
public void LoggingTest() { var server = new DummyServer(); var task = server.Run(24224); var properties = new NameValueCollection(); LogManager.Adapter = new FluentLoggerFactoryAdapter(properties); var logger = LogManager.GetCurrentClassLogger(); logger.Debug("test"); var ret = task.Result; Utils.Unpack(ret).Is(@"[ ""Fluent.Fluent.Test.FluentLoggerTest"", 1360421509813, { ""Level"" : ""DEBUG"", ""Message"" : ""test"" } ]"); }