Change Timestamp value in enterprise library exception handling formatter

安稳与你 提交于 2019-11-30 09:22:12

问题


I am using enterprize library 5.0 with c# for exception handling and for that I am using formatter.Now In my log file Timestamp is not giving the right time. Can I change the value of timestamp in formatter.


回答1:


Timestamp: {timestamp(local)} will get the local system time




回答2:


The timestamp entry uses UTC so that exceptions logged in different timezones can be correlated. The best idea is to convert the time to local if and when you read the trace log file and present the information to the user.



来源:https://stackoverflow.com/questions/2972451/change-timestamp-value-in-enterprise-library-exception-handling-formatter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!