소스 검색

1.只显示调用的类名,不显示命名空间

旭 王 1 주 전
부모
커밋
1b73f4126a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      WpfApp1/NLog.config

+ 1 - 1
WpfApp1/NLog.config

@@ -3,7 +3,7 @@
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
 	<!-- 定义日志输出格式模板 -->
-	<variable name="myLayout" value="[${longdate}] ${level:uppercase=true} ${threadid}[${callsite:className=true:methodName=false}] - ${message}${exception:format=toString}" />
+	<variable name="myLayout" value="[${longdate}] ${level:uppercase=true} ${threadid}[${callsite:className=true:methodName=false:includeNamespace=false}] - ${message}${exception:format=toString}" />
 
 	<!-- 全局设置:定义四个不同的异步文件目标 -->
 	<targets>