本文只说最最简单的用法,本文基于.net core 使用NLog 基于ILogger
源码地址:https://github.com/BigMaJx/OOPDemo/tree/master/Api
第一步:引入 NLog.Targets.ElasticSearch
第二步:修改NLog.Config
关键:(type:ElasticSearch; uri :es写入地址; index:es索引)。
第三步:添加写入代码>运行程序>查看Kibana
大功告成!
本文只说最最简单的用法,本文基于.net core 使用NLog 基于ILogger
源码地址:https://github.com/BigMaJx/OOPDemo/tree/master/Api
关键:(type:ElasticSearch; uri :es写入地址; index:es索引)。
大功告成!