cosmos-loops / cosmos-logging Goto Github PK
View Code? Open in Web Editor NEWLogging component for .NET Core with nice APIs for developers to use.
License: Apache License 2.0
Logging component for .NET Core with nice APIs for developers to use.
License: Apache License 2.0
public static string SafeString(this object @object) => (@object as string).SafeValue();
这个地方,如果传入 int t = 0; t.SafeString(),个人认为应该返回 “0”
Loggly sink for Cosmos.Logging 0.1.1
重构为基于 Cosmos.Logging.Core.ObjectResolving.CustomResolveRule
的设计
I think it must be to do something interesting ..
添加对京东云 JD Cloud Log Service 的支持
Token Renderer 添加扩展方法的支持
添加对番茄日志 TomatoLog 的支持
项目地址:https://github.com/lianggx/TomatoLog
Console sink for Cosmos.Logging 0.1.1
添加对腾讯云 Tencent Cloud CLS 的支持
添加 SimpleLogger
SimpleFutureLogger
入口解除Cosmos.Logging对Microsoft.Extensions.Configuration.Json/Xml在直接耦合,将之分离到独立的配置项目之中,降低主库的依赖。
添加对 FreeSql 的支持
完成 Cosmos.Logging.Sinks.File
相关api可参考:
添加对华为云 HUAWEI Cloud LTS 的支持
根据 #24 ,Cosmos.Logging.Sinks.File 完成以下任务:
日志上下文 ContextData 增加预置模板
将环境、进程两大渲染组件独立化,并增加渲染组件的自扫描初始化
Add Exceptions extensions.
reference to:
https://github.com/RehanSaeed/Serilog.Exceptions
添加对阿里云 Aliyun SLS 的支持
Cosmos.Logging 当直接使用 IConfiguratonRoot 时解析处理程序为空
增加输出模板 Output template,调整渲染参数,,拟移除渲染参数选项,将该功能简化并入输出模板之中。
修正结构化参数渲染输出出现问题的 BUG
测试代码:
logger.LogInformation(@"
{{多字段匿名对象测试1:基于 Cosmos.Logging.Args 的测试}}
Hello: {@Hello},
World: {@World},
0: {0},
1: {1},
Hello: {@Hello},
World: {@World}",
new Args(new {Hello = "_hello_", World = "_world_"}, "?world?"));
logger.LogInformation(@"
{{多字段匿名对象测试2:基于普通匿名对象的测试}}
Hello: {@Hello},
World: {@World},
0: {0},
1: {1},
Hello: {@Hello},
World: {@World}",
new {Hello = "_hello_"}, "?world?", new {World = "_world_"});
结果:
[Cosmos.Loggings.MessageTemplateTokenTests.Program][0][Information]
{多字段匿名对象测试1:基于 Cosmos.Logging.Args 的测试}
Hello: Cosmos.Logging.Args,
World: {@World},
0: Cosmos.Logging.Args,
1: {1},
Hello: Cosmos.Logging.Args,
World: {@World}
[Cosmos.Loggings.MessageTemplateTokenTests.Program][0][Information]
{多字段匿名对象测试2:基于普通匿名对象的测试}
Hello: _hello_,
World: _world_,
0: { Hello = _hello_ },
1: ?world?,
Hello: _hello_,
World: _world_
添加对形如 {@One.Name} 的自定义 Token 的支持:
logger.LogInformation("Nice {@One.Name}", new {One = new {Name = "Alex LEWIS"}});
即:Custom property token 添加对对象子成员(Property or Field)的读取支持。
添加对 Npgsql.Logging 的集成
https://github.com/npgsql/npgsql/tree/dev/src/Npgsql/Logging
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.