java logcat "-s"选项 用法,Android的logcat的连续重复的警告:"标准头的加入....不准"...

墨蓝 2022-08-29 14:53 189阅读 0赞

![Image 1][]

I’ve been developing an Android application using version 2.3.3 (API 10). The application simply uses Flickr Java API (flickrj) to make certain search queries based on tags, date, geographical info etc. and displays the search result photos to the user. I have been working on it for 2 weeks and using my HTC Sensation to debug it via the USB debugger. Today, I somehow started to get an annoying warning message that loops over and over in my LogCat. It is as follows:

11-30 00:31:43.083: I/org.restlet(22899): Couldn’t find the mandatory “Host” HTTP header.

11-30 00:31:43.143: D/com.fd.httpd(22899): sdcard phone type != 1

11-30 00:31:43.143: D/com.fd.httpd(22899): emmc phone type != 1

11-30 00:31:43.163: I/LogService(22899): 2011-11-30 00:31:43 127.0.0.1 - 127.0.0.1 8182 GET /info/ - 200 1143 0 52 http://null - -

11-30 00:31:43.163: I/Server(22899): Addition of the standard header “pragma” is discouraged as a future versions of the Restlet API will directly support it.

11-30 00:31:43.163: W/Server(22899): Addition of the standard header “cache-control” is not allowed. Please use the equivalent property in the Restlet API.

11-30 00:31:43.163: W/Server(22899): Addition of the standard header “expires” is not allowed. Please use the equivalent property in the Restlet API.

When I shut down or restart my phone, the warning messages are no longer looped. But when I begin to play around with my application using the USB debugger, the warnings begin to show up again after a while. I can keep on developing/debugging my application without a problem, but since these warnings are crowding the LogCat window, it becomes very difficult to trace what’s going on.

I’ve checked to see if anyone else had the same problem and the only clue I’ve got is to check the pid number repeated in the warnings: 22899. This pid no belongs to the package “com.fd.httpd” (HTC Sync application) which is required for me to setup the USB driver for debugging with a PC. But I have no idea why HTC Sync is causing an error.

I would be glad if anyone could share their ideas about the reason and a possible solution. Thank you for your time.

解决方案

Set up filters in LogCat, for example use a speficic tag in all your apps logs, and filter for that, so system logs will not clutter you

[Image 1]:

发表评论

表情:
评论列表 (有 0 条评论,189人围观)

还没有评论,来说两句吧...

相关阅读

    相关 logcat使用方法

    在网上转了好久,经过无数次失败的教训,不能怪网上的文章太难了,只能是自己水平不够, 终于总结出了logcat的使用方法 其实很简单。就是 logcat -s instal