How to disable D/libc from logging network information into logcat?
Asked Answered
I

1

8

I am getting a lot of debugging log in my Android logcat like this:

10-16 17:21:38.422  22842-23270/package D/libc﹕ [NET] getaddrinfo+,hn 23(0x696d616765732e),sn(),family 0,flags 4
10-16 17:21:38.422  22842-23270/package D/libc﹕ [NET] getaddrinfo-,err=8
10-16 17:21:38.422  22842-23270/package D/libc﹕ [NET] getaddrinfo+,hn 23(0x696d616765732e),sn(),family 0,flags 1024
10-16 17:21:38.422  22842-23270/package D/libc﹕ [NET] getaddrinfo-, 1
10-16 17:21:38.422  22842-23270/package D/libc﹕ [NET] getaddrinfo_proxy+
10-16 17:21:38.432  22842-23270/package D/libc﹕ [NET] getaddrinfo_proxy-, success

I am not sure where they come from because I did not have such tag in my codes, but they are clearly related to network activities.

Inerrant answered 16/10, 2014 at 9:28 Comment(0)
M
5

You can add ^(?!(libc)) in a logcat filter

1) Create logcat filter Add filter

2) Apply regex apply regex

You can also remove differents tags by adding tag's name seperate by | in the regex.

Example : ^(?!(libc|tagname2|tagname3|...))

Moscow answered 5/3, 2015 at 16:0 Comment(1)
Yes. This is a valid solution. However, I am more interested in removing the "logging action" from the root, rather than filtering the result. Thanks anyway!Inerrant

© 2022 - 2024 — McMap. All rights reserved.