Code Monkey home page Code Monkey logo

cosmos-logging's People

Contributors

alexinea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cosmos-logging's Issues

SafeAndNullableExtensions.cs 有点问题

public static string SafeString(this object @object) => (@object as string).SafeValue();
这个地方,如果传入 int t = 0; t.SafeString(),个人认为应该返回 “0”

Cosmos.Logging | 增加 SimpleLogger 和 SimpleFutureLogger

添加 SimpleLogger

  • 只提供 String.Format
  • 无 Token 化(整体 TextToken 化)
  • 不对附加参数进行解析,整体交于 String.Format
  • 不支持 Cosmos.Logging 内置渲染、扩展方法
  • SimpleLogger 与 FutureLogger 同级,并提供 SimpleFutureLogger 入口

Cosmos.Logging | Solo Configuration

解除Cosmos.Logging对Microsoft.Extensions.Configuration.Json/Xml在直接耦合,将之分离到独立的配置项目之中,降低主库的依赖。

Solo Renderers

将环境、进程两大渲染组件独立化,并增加渲染组件的自扫描初始化

Cosmos.Logging | 修正结构化参数渲染输出出现问题的 BUG

修正结构化参数渲染输出出现问题的 BUG

  1. 针对 Cosmos.Logging.Args 对象没有做有效处理
    • 将该对象打包的一组业务对象视作同一个 args,导致自定义具名Token、PositionalToken 在渲染时无法获取准确结果
    • 没有特别处理 ToString(),导致渲染结果为 Cosmos.Logging.Args

测试代码:

                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_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.