commit | 6b17842f445b68b075f247b841285a36c502adda | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Thu Sep 16 17:08:51 2021 -0700 |
committer | Matthew Maurer <mmaurer@google.com> | Tue Oct 05 16:52:41 2021 -0700 |
tree | f64703609e66dd9ff5dbb1635c247af7853e598f | |
parent | 29c917d95e15509f9901fe8a846b40bcda36a8bd [diff] |
DoH: Refactor FFI * Factor out constants to level enum conversion * Document property that doh_init_logger will have no effect on future calls * Change `doh_set_log_level` to default to `Error` logging on an invalid value rather than disabling all logging. This matches the behavior of `doh_init_logger`. * Prefix constants with `DOH_`. `cbindgen`-exported constants are not in a namespace; they are raw C constants. Prepending the library name will help avoid future collisions. * `android_logger::init_once` explicitly states in the documentation that calling it more than once is safe, and will simply not change the logger on future calls. Bug: 202081046 Change-Id: I91a8a7f40363ee2dcf6211fb595e1c6e7f6084a8
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.