a50f2679f56650a8ac34160e6c4ba31e1c2ea232 |
|
23-Feb-2018 |
mukesh agrawal <quiche@google.com> |
WifiLog: add annotation to ensure lazy logging To optimize away disabled log messages, WifiLog needs its callers to pass in parameters via method calls, rather than by stringifying the parameters. Add the @CompileTimeConstant annotation to the appropriate WifiLog methods, so that error-prone can verify that the API is used optimally. Bug: 73971539 Test: tests/wifitests/runtests.sh Test: m javac-check-wifi-service RUN_ERROR_PRONE=true Test: m FrameworksWifiTests RUN_ERROR_PRONE=true Change-Id: I946ed9c9876d7a9583d8790dcf3d7235a2bf699c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|
bd9be6d8cab19c78a6bf14b62c4bbb6ef8d13769 |
|
23-Feb-2018 |
mukesh agrawal <quiche@google.com> |
LogcatLog: add tracing functionality to trace() Some people have the crazy idea that the trace() method should help trace program execution. I don't know why they would think that, but I'll relent and make it so. Along the way: refactor how we filter trace/debug messages, so that we don't pay the cost of a stack trace unnecessarily. Bug: 73972044 Bug: 30737821 Test: tests/wifitests/runtests.sh (on walleye) Change-Id: Ida435642af81945bfcb16db5cf39b20e5bebc5bb
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|
64acb4210ced1920fc29caa98a353b2968fd33b5 |
|
22-Dec-2016 |
Sohani Rao <sohanirao@google.com> |
Add method to handle boolean arguments to log Overload LogMessage's c() function with boolean argument Change-Id: I33cc6478b8f4f46f6f990933c0cb1a3011afcc84 Bug: 33839553 Test: Unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|
e4c87d4f40bbbcd0ba1d0d8d17953763b2ad320e |
|
05-Aug-2016 |
mukesh agrawal <quiche@google.com> |
WifiLog: add CheckReturnValue annotation We'd like ErrorProne to flag misuse of the WifiLog API. Add the @CheckReturnValue annotation, so that ErrorProne can help us out. Note that the @CheckReturnValue annotation requires adding jsr305 to the WifiService build. This is not, however, a new dependency for the framework in general. In particular, jsr305 is already used by frameworks/base/packages/EasterEgg. While there: fix-up use of @ThreadSafe in LogcatLog. (Now that we're pulling in jsr305, we can actually use the annotation, instead of having the annotation commented out.) BUG=30738484 TEST=wifitests/runtests.sh TEST=mma -j32 RUN_ERROR_PRONE=true javac-check (might fail) TEST=find . -name '*.java' | xargs touch TEST=mm -j32 RUN_ERROR_PRONE=true javac-check (should pass) Change-Id: I5d55b287b197710cde3fa0d31c8a5ccf09edd2fa
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|
f5d90be206db98bbd5894afc8d757dd32360b2d9 |
|
05-Aug-2016 |
mukesh agrawal <quiche@google.com> |
logging: add convenience APIs for literal messages Literal messages are reasonably common, so we should make them easy to log. Add APIs for that purpose, and migrate WifiDiagnostics to use them. Note that, functionally speaking, the LogcatLog implementations of these APIs behave the same their corresponding legacy APIs. However, we add these APIs for two reasons: - To track which log messages have been audited, to determine whether or not they contain parameters. - So that the WifiLog implementation for the new backend can inform the backend that these messages are clean (free of any sensitive data). Finally, we note that these convenience APIs may also provide a performance benefit. (Because the message is parameter-less, there's no need to create a LogMessage.) While there: change the level of some WifiDiagnostics log messages, to fit our new logging guidelines. BUG=30737889 TEST=wifitests/runtests.sh Change-Id: I3d39c1932800af6a818c59b6497c868f8399f8fa
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|
573de1504ea684a2a647613659d4771c2a315eea |
|
06-Aug-2016 |
mukesh agrawal <quiche@google.com> |
logging: add chained logging API Add a new logging API, which uses call-chaining to generate log messages. The chaining approach will reduce the cost of disabled log messages, as such messages won't need to be formatted. While there: add some missing @override annotations. BUG=30736748 TEST=wifitests/runtests.sh Change-Id: I132fd3955426b8528208a21f4f1ecd402962ffd0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|
0c96e05ef24dc72fa31b6915ed40f09dc7238276 |
|
29-Jul-2016 |
mukesh agrawal <quiche@google.com> |
WifiService: add WifiLog interface As a first step towards updating the logging functionality in WifiService, we need to abstract the existing liblog-style logging that we use. To that end, add: 1) WifiLog, an Interface for logging, and 2) LogcatLog, an implementation of WifiLog, which uses android.util.Log as the backend. Clients of android.util.Log, within WifiService, will be migrated to this new API over time. The first client to be migrated will be WifiDiagnostics (in my very next CL). BUG=30564891 TEST=wifitests/runtests.sh Change-Id: Idd907c4bd8a2931d85b036593b6952018b46c6fb
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiLog.java
|