Explorar el Código

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

旭 王 hace 1 semana
padre
commit
1b73f4126a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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>