Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用带有 c# 的企业库 5.0 进行异常处理,为此我正在使用格式化程序。现在在我的日志文件中,时间戳没有给出正确的时间。我可以在格式化程序中更改时间戳的值吗?
时间戳:{timestamp(local)} 将获取本地系统时间
时间戳条目使用 UTC,以便可以关联在不同时区记录的异常。最好的办法是在您读取跟踪日志文件并将信息呈现给用户时将时间转换为本地时间。