【发布时间】:2014-01-06 11:45:58
【问题描述】:
我正在使用 NLog 进行日志记录。 目前我的布局字符串是:
"${date:format=dd.MM.yyyy HH\\:mm\\:ss,fff} | ${level:uppercase=true} | ${message}"
这会产生以下日志:
18.12.2013 11:23:14,834 | INFO | this is an info
18.12.2013 11:23:14,835 | TRACE | this is a trace
我现在想要的是格式化“$level”以填充空格,使其看起来像一个有 5 个字符的表格。
我想要:
18.12.2013 11:23:14,834 | INFO | this is an info
18.12.2013 11:23:14,835 | TRACE | this is a trace
遗憾的是,我没有找到任何东西......有人可以帮忙吗?
【问题讨论】:
标签: format whitespace nlog