commit | e74c751f46a030e710478e928088d22d4bcda234 | [log] [tgz] |
---|---|---|
author | Ken Chen <cken@google.com> | Fri Sep 16 23:58:57 2022 +0800 |
committer | Ken Chen <cken@google.com> | Fri Sep 16 23:58:57 2022 +0800 |
tree | 4da556205ee77f5aa88e59b493563dc7940a1285 | |
parent | 8b815120715877e3c87bd8dd8ad315382da321db [diff] |
Add trace for GetHostByName and GetHostByAddr Like GetAddrInfo and ResNSend, GetHostByName and GetHostByAddr should print the caller uid so that we can know which app is flooding DNS queries. Bug: 246102271 Test: run ResolverTest#GetHostByAddr_ReverseDns64Query, ResolverTest#GetHostByName and check resolver logs. Change-Id: Id81f952836facec66c0f4ab86c1d9d384962a23e
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.