Windows Phone 实用开发技巧(24):上传日志

来源:Alexis的51博客 责任编辑:栏目编辑 发表时间:2013-07-01 19:51 点击:

 In my last post《Windows Phone 实用开发技巧(22):使用日志记录当前信息与异常信息》 , I talked about how to log in our application. Here comes the problem: how can we get the log file. If we run application locally, we can use ISETool to get files stored in IsolatedStorage. But since app users are far away from you. We cannot go to somebody and say “Hey, can I use your phone to get my log back…bala..bala..”

We can make a button that is used to let user to upload logs, use vdisk as destination. We can rename log files with time so that we can distinguish when the log file sent to our space. Here I built a demo app use vdisk and logging library to demonstrate how to upload log files to vdisk.

1. Create a new project named:mangoUploadLog, add essential libs to it

image

2.Edit App.xaml.cs, add some log in it. We log the lifecycle of the app

// Code to execute when the application is launching (eg, from Start)         // This code will not execute when the application is reactivated         private void Application_Launching(object sender, LaunchingEventArgs e)
        {
            

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • Windows Phone 项目实战之我的微盘(下)
      • Windows Phone 实用开发技巧(26):对DataTemplate中的元素播放
      • Windows Phone 实用开发技巧(25):Windows Phone读取本地数据
      • Windows Phone 实用开发技巧(27):创建透明Tile
      • Windows Phone 知识锦(12月版)
      • Windows Phone实用开发技巧(31):密码加密
      • Windows Phone 项目实战之我的微盘(上)
      • WP7实例篇之土豆搜索器(2)
      • [翻译]WP7 QuickStart-第七篇-布局
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1