c# - NLog:缩进消息
问题描述
示例:方法 A 调用方法 B,B 调用 C,所有方法都将消息写入日志。是否可以像这样使用 NLog 自动缩进消息?
String in method A before B is called
First string in method B
Second string in method B and call C
First string in method C
Second string in method C
Third string in method B after C is called
String in method A after B is called
也许有一些API来指定当前缩进级别,所以所有后续输出到日志都将使用这个级别?
解决方案
推荐阅读
- kubernetes - 在 MicroK8s 中运行 JFrog 打开文件太低
- c# - 并行长时间运行任务的时间优化
- java - 如何使用java在Selenium中已经打开的excel表上写
- regex - Perl 正则表达式解析第一个锚标记
- python - python manage.py runserver 不显示任何内容
- r - 将字符向量与 data.frame 和完整的表相结合
- kotlin - 带有 kotlin MVVM 和数据绑定的 recyclerview 中的单选按钮
- ios - 从 xcode 10.1 安装到 iOS 12+ 时,应用程序在启动屏幕上冻结
- java - 在模型运行时显示 ELKI DBSCAN 聚类模型的进度?
- angular - 从 Angular 5 开始的最佳方式 - 需要更新的资源