what is logging ?
logging is the felling, skidding, on-site processing, and loading of trees or logs onto trucks. and since windows phone is much more event driven. you can find more information in event logging.
why to use logging ?
exception is everywhere in common software development. a good logging tool may helps a lot in solving problems. here i recommend logging tool in wp7contrib.
here i created a helper class to do better and easier logging.
we can log common information as well as exception simply by pass different parameter. we can also log device information since it may be help in finding which device goes wrong.
how to use it ?
first, we should add dll reference to our main project, shown as follow:
after that, we manually generate a dividebvzeroexception, shown as below:
here, i use logginghelper(shown before) class to log exception.as we run the app, we can find exception both in output and log.dat which is the file store logging.
ok, it is very simple to use. you can find source code here.
作者“alexis的51博客”
如对本文有疑问, 点击进行留言回复!!
解决ViewPager设置高度无效问题,从源码角度分析并解决问题
UltraEdit等软件详细安装破解教程,附注册机(全网独家可用)
Xmanager PowerSuite 6企业版详细安装破解教程,解决评估过期问题(附注册机,全网独家可用),非学校/家庭免费版
Navicat 12.x for MySQL最新版安装破解教程(附安装包和注册机,全网独家可用
xmind 8 update8(pro)最新版专业版破解教程(附破解补丁以及注册机,全网独家可用)
Sublime Text 3.2.1详细安装破解教程,附最新激活码license(全网独家可用有效)
网友评论