fanliang11 / surging

Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
MIT License
3.24k stars 923 forks source link

NLog #414

Closed TeslaHan closed 3 years ago

TeslaHan commented 3 years ago

你好,使用UseNLog,这个模块,然后加载到对应的服务中,日志不能记录 image

image

fanliang11 commented 3 years ago

谢谢关注社区版surging, UseNLog配置已过时,可以通过添加引用和基于Rootpath扫描加载Surging.Core.Nlog引擎组件。如果是多种类型的日志组件,请基于surgingsetting 文件配置using 配置节,把NLogModule添加进去


    "Packages": [
      {
        "TypeName": "EnginePartModule",
        "Using": "${UseEngineParts}|ServiceProxyModule;ProtokollwandlerModule;DotNettyModule;NLogModule;ConsulModule;MessagePackModule;WSProtocolModule;MqttProtocolModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;ApiGeteWayModule;SkywalkingModule;KestrelNLogModule;GrpcModule;ApolloModule;LiveStreamModule;"
      }
    ]
'''
TeslaHan commented 3 years ago

谢谢关注社区版surging, UseNLog配置已过时,可以通过添加引用和基于Rootpath扫描加载Surging.Core.Nlog引擎组件。如果是多种类型的日志组件,请基于surgingsetting 文件配置using 配置节,把NLogModule添加进去

    "Packages": [
      {
        "TypeName": "EnginePartModule",
        "Using": "${UseEngineParts}|ServiceProxyModule;ProtokollwandlerModule;DotNettyModule;NLogModule;ConsulModule;MessagePackModule;WSProtocolModule;MqttProtocolModule;EventBusRabbitMQModule;CachingModule;KestrelHttpModule;SwaggerModule;ApiGeteWayModule;SkywalkingModule;KestrelNLogModule;GrpcModule;ApolloModule;LiveStreamModule;"
      }
    ]
'''

谢谢,你能抽时间回复。 我这里也通过setting文件配置using配置节,启动的时候,也能加载,但,还是不能打印日志,也通过引用的方式把nlog引入进来,但服务里面还是不能打印日志,麻烦再看一下。谢谢! image image

fanliang11 commented 3 years ago

你的using 里有SerilogModule ,这样会造成日志组件冲突,还有需要注意的是,如果你引用了 Surging.Core.KestrelHttpServer 组件,就需要附加引用Surging.Core.Kestrel.Nlog, 还需要在配置节using中添加KestrelNLogModule

TeslaHan commented 3 years ago

你的using 里有SerilogModule ,这样会造成日志组件冲突,还有需要注意的是,如果你引用了 Surging.Core.KestrelHttpServer 组件,就需要附加引用Surging.Core.Kestrel.Nlog, 还需要在配置节using中添加KestrelNLogModule

你好,我去掉SerilogModule 模块,谢谢提醒,使用KestrelHttpServer,需要附件ketrel.Nlog模块。现在配置如下 image 日志在服务中依旧无法打印 image

fanliang11 commented 3 years ago

如果还有问题,我就不知道了,我这里没有问题,代码是从github下载的,几十家企业用户没有反应日志问题 图片 图片

TeslaHan commented 3 years ago

谢谢!已查找到未引用Protocol.WS服务