summaryrefslogtreecommitdiff
path: root/core/java/android/util/Log.java
Commit message (Collapse)AuthorAgeFilesLines
* Document that Log can quietly swallow UnknownHostExceptions.Jonathan Lepage2021-11-041-0/+7
| | | | Change-Id: I7d3239eadf7dd73dd1ff12d2924bb43d3e357299
* Remove incorrect statement from Log docs.Torne (Richard Coles)2020-10-131-3/+1
| | | | | | | | | | | The javadoc for Log stated that verbose logs are not compiled into apps and debug logs are stripped at runtime, but this doesn't happen automatically and is up to the app's Proguard/R8 configuration and/or explicit use of isLoggable. Just remove this. Fixes: 27286343 Test: m offline-sdk-docs Change-Id: I0376b20e5c324f422a5fff0201f144e447d8eac2
* Fix minor error in documentation of isLoggableShanthanu Bhardwaj2020-09-261-1/+1
| | | | | | | | The change which removed the IllegalArgumentException was released in O (API level 26) (https://android.googlesource.com/platform/frameworks/base/+/8143fa57adfbb4a5cc253e4ef68663525a8f81eb), so the exception is thrown till API level 25, NOT 23 as the documentation currently states. Bug: 124593220 Change-Id: Ia4c094cd7ae68f978bd5f49a9b294286dbe5bb61
* Make Log.isLogagble @FastNativeMakoto Onuki2020-03-231-0/+3
| | | | | | | | | | | | | This CL doens't change println_native() because: - To avoid potential risks (jank?) because it's kind of late in the RVC cycle. - The JNI overhead is unlikely to be a major problem in logging. If apps are making *that* many log calls, that itself would be a bigger problem. Test: treehugger / boot Bug: 152217649 Change-Id: I86aeb62b217e5331e6bbd02a0ba592fd050a41b2
* Expose logToRadioBuffer as system APIMeng Wang2020-01-161-1/+2
| | | | | | Bug: 144374158 Test: make Change-Id: I2d25a5844733ed7f1e0bb3f66d39f746f0f7acd8
* Add a copy of Rlog for the telephony mainline moduleMakoto Onuki2020-01-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | We can't expose android.telephony.Rlog directly to the telephony module as @SystemApi because we can't protect it from app code. So instead, expose a lower level API from the Log class to the telephony module with client=SystemApi.Client.MODULE_LIBRARIES so it can only be accessed by boot classpath code, and then create a copy of Rlog in the telephony module, which internally use the aforementioned API. Note: - Support for MODULE_LIBRARIES is not fully in yet, so for now the Log.logToRadioBuffer() API is still hidden. - Once all the infra is in, we can expose logToRadioBuffer. - Once we mark it with MODULE_LIBRARIES, ART will protect it against app code, so no further protection will be needed. Bug: 144374158 Test: boot Change-Id: I5be0497a17d00152286fe3351bf58e75b675ceb6
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-071-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+3
| | | | | | | | | | | | | | | | | | | For packages: android.util.proto android.util.jar android.util.apk android.util This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ia0f48c244b0fbe33d40d797702a82303648196ed
* Merge "Code formatting change for upcoming annotations." am: 5d669f79f2 am: ↵Mathew Inwood2018-08-011-2/+2
|\ | | | | | | | | | | | | | | 5d44cf6f72 am: 37030d9884 am: 2b55fef6b9 Change-Id: I4110c2cb0273dc3eb617bf10687d4f4781ae98aa
| * Code formatting change for upcoming annotations.Mathew Inwood2018-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | Putting /** @hide */ on the same line results in the automated annotation addition putting the annotation the previous line, which then results in the @hide javadoc annotation being ignored (since it's now no longer strictly before the method declaration). Bug: 110868826 Test: m Change-Id: I1b5c290a17ead46effd2f2ff3f4b33884efbc116
| * Merge "Frameworks: Move Log holder to be preloaded"Andreas Gampe2017-09-281-3/+3
| |\ | | | | | | | | | | | | | | | am: 7dd3a7d5c0 Change-Id: Ief51fd7b8cdf14c22ded48fde7121d6cca8f243e
| | * Frameworks: Move Log holder to be preloadedAndreas Gampe2017-09-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid issues with late initialization, let the holder be initialized in the zygote. (cherry picked from commit 61a3e8c23a7c62c389433113802a0d74f4ab53cf) Bug: 65927416 Test: m Merged-In: I6f454df46d4c64d295e1f2510793d5087b74fb74 Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
* | | Add typedef for the Log levelTor Norbye2018-06-051-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds an @IntDef specifying the valid constants that can be supplied as the Log level. It also removes a documentation reference to a (former?) level named "SUPPRESS" which doesn't exist. Test: In lint Change-Id: I159d687a5c16be76afcd7a3370a5f02025a1aff7
* | | Annotate Log reference parameters and return types.Jake Wharton2018-06-041-25/+29
| | | | | | | | | | | | | | | | | | Bug: 78245676 Test: atest LogNullabilityTest Change-Id: Icbb26d23ed89e1fabd019108d4484902468c165e
* | | Frameworks: Move Log holder to be preloadedAndreas Gampe2017-09-271-3/+3
|/ / | | | | | | | | | | | | | | | | To avoid issues with late initialization, let the holder be initialized in the zygote. Bug: 65927416 Test: m Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
* | Merge "add links to Log class summary for methods and logcat doc" into oc-devScott Main2017-06-291-2/+3
|\ \ | |/ |/| | | | | | | am: ea6fea4d5d Change-Id: I205254f618a3a405aab6f783f5d7de99c9a3a907
| * add links to Log class summary for methods and logcat docScott Main2017-06-281-2/+3
| | | | | | | | | | | | bug: 29123084 Change-Id: Ida1351ca3647faa133905c5ff85df716bffd3203
| * jni: isLoggable: adapt to removal of property name size limitMark Salyzyn2017-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 8143fa57adfbb4a5cc253e4ef68663525a8f81eb) There is no longer a name size limit to the properties, remove illegalArgumentException if tag length is too large. Test: build Bug: 36696208 Change-Id: I4b4329c8c951082ed0d777cdd70ee3e773bed16c
* | Merge "Log: increase visibility of Log.TerribleFailure"Mukesh Agrawal2017-04-271-1/+2
|\ \
| * | Log: increase visibility of Log.TerribleFailuremukesh agrawal2017-04-261-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Log.setWtfHandler() provides a way to override the default TerribleFailureHandler, so that we can test that a piece of code reports as terrible failure as expected. Unfortunately, we can't actual use setWtfHandler() at the moment. The problem is as follows: 1. The Log.setWtfHandler() method requires a Log.TerribleFailureHandler instance. 2. The Log.TerribleFailureHandler interface requires subclasses to implement a onTerribleFailure() method. The method requires a Log.TerribleFailure argument. 3. Log.TerribleFailure is a private inner class. Given the above, classes outside of Log can't create an appropriate argument to pass to Log.setWtfHandler(). To resolve this, we update the visibility of Log.TerribleFailure to be the same as that of Log.setWtfHandler(), and Log.TerribleFailureHandler. Test: m -j32 Bug: 37425059 Change-Id: Ie646b931869582398d61495e367e0d36e767a3e3
* / jni: isLoggable: adapt to removal of property name size limitMark Salyzyn2017-04-111-1/+3
|/ | | | | | | | | There is no longer a name size limit to the properties, remove illegalArgumentException if tag length is too large. Test: build Bug: 36696208 Change-Id: I4b4329c8c951082ed0d777cdd70ee3e773bed16c
* When system server goes down, crash apps more.Jeff Sharkey2016-02-271-0/+7
| | | | | | | | | | | | | | Similar to first patch, but now using new "rethrowFromSystemServer()" method which internally translates DeadObjectException into DeadSystemException. New logic over in Log.printlns() now suppresses the DeadSystemException stack traces, since they're misleading and just added pressure to the precious log buffer space. Add some extra RuntimeInit checks to suppress logging-about-logging when the system server is dead. Bug: 27364859 Change-Id: I05316b3e8e42416b30a56a76c09cd3113a018123
* Frameworks/base: Use Log.printlns in RuntimeInitAndreas Gampe2016-02-181-1/+2
| | | | | | | | | | | Make printlns in Log public-@hide so it can be used. Print uncaught exceptions that will terminate the process in RuntimeInit using printlns, so that long exception traces are not being truncated. Bug: 27245306 Change-Id: Ib24635f0ebdd80bd125e367302cab6a78e6a210a
* Frameworks/base: Change android.util.Log multiline loggingAndreas Gampe2015-12-171-8/+112
| | | | | | | | | | To avoid long stacktraces being truncated, add code to split up large chunks along line breaks. Introduce LineBreakBufferedWriter to chunk up log output. Add a core test for it. Change-Id: I34160fbce853c21329f7fa109a9c42506b2066af
* Change wtf errors from ASSERT to ERROR.Christopher Ferris2015-06-091-1/+4
| | | | | | | | | | | | | Calling println_native with the value of ASSERT will set the abort message. Unfortunately, there are numerous cases where one thread aborts, but before that thread can communicate with debuggerd, another thread calls wtf, which overwrites the abort message from the original failing thread. Fix this by changing this to an error level log message. Bug: 21490722 Change-Id: I9500e2e63eea96722602fdd46c86939c001a7c65
* Fix issue #17323751: Additional items in aggregated battery statsDianne Hackborn2014-12-051-0/+5
| | | | | | | | | | | | | | | - Now aggregate number of times each process has crashed and ANRed. - Now aggregate total number of connectivity changes. - Now record connectivity changes in the history. Crash and ANR counts are new entries at the end of "pr" in checkin. Connectivity change counts is a new entry at the end of "m" in checkin. Connectivity changes in the history checkin are Ecn and include the type of connection and its state. Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a
* Fix issue #17146552: system anrDianne Hackborn2014-08-261-9/+10
| | | | | | | Add a safe path for Slog.wtf that doesn't acquire an activity manager lock or block in any way. Change-Id: I8fef8251a0cb85081442cae55d85063944248d15
* Native Runtime: Add LOG_ID_CRASHMark Salyzyn2014-04-151-0/+1
| | | | Change-Id: I4e3a82636901c5169cc6b714a4fec815cd757c58
* Fix issue #11223335: APR: Lots of failures in procstats due to...Dianne Hackborn2013-10-141-12/+7
| | | | | | | | | | | | ...bad cleanup of crashing processes We now have a special path for crashing processes, to silently clean up their state. Also some tweaks to Log/Slog.wtf to get better stack crawl summaries in APR. Change-Id: Ieced26989907a6e7615b6fa033813fced78d7474
* Fix issue #11005453: [SUW] G+ profile creation for new user brokenDianne Hackborn2013-10-011-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main problem here was a mistake when turning a single process structure to a multi-package-process structure with a common process. When we cloned the original process state, if there were any services already created for the process for that package, they would be left with their process pointer still referencing the original now common process instead of the package-specific process, allowing the active counts to get bad. Now we switch any of those processes over to the new package-specific process. There was also another smaller issue with how ServiceRecord is associated with a ServiceState -- we could be waiting for an old ServiceRecord to be destroyed while at the same time creating a new ServiceRecord for that same service class. These would share the same ServiceState, so when the old record finally finished destroying itself it would trample over whatever the new service is doing. This is fixed by changing the model to instead of using an "active" reference count, we have an object identifying the current owner of the ServiceState. Then when the old ServiceRecord is cleaning up, we know if it is still the owner at that point. Also some other small things along the way -- new Log.wtfStack() method that is convenient, new suite of Slog.wtf methods, fixed some services to use Slog.wtf when catching exceptions being returned to the caller so that we actually know about them. Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
* Use FastPrintWriter... everywhere.Dianne Hackborn2013-06-241-1/+3
| | | | | | | | | | | | | One problem this turned up is, because FastPrintWriter does its own buffering, a lot of code that used to use PrintWriter would fail -- if it pointed to a StringWriter, there was no buffering, so it could just immediately get the result. Now you need to first flush the FastPrintWriter. Also added some new constructors to specify the size of buffer that FastPrintWriter should use. Change-Id: If48cd28d7be0b6b3278bbb69a8357e6ce88cf54a
* Reduce log spew.Joe Onorato2011-05-191-0/+12
| | | | Change-Id: I69c9d7227d6cb91eac3b9f18d9edaa121c86ad0f
* Put Log.wtf's terrible failure in logcat -b main.Brad Fitzpatrick2010-12-151-1/+1
| | | | | | | | As discovered by jpa@, previously it was only in logcat -b events, not -b main, which people don't typically watch. Bug: 2964398 Change-Id: Id672dd936f1678dd347158428b0ca03e4ad1e2d4
* Log.wtf when databases go to be downgraded.Brad Fitzpatrick2010-06-081-2/+33
| | | | | | BUG=2734435 Change-Id: I686d6d9415f3081544c3fbe379287c31e0ecec20
* Switch the services library to using the new SlogJoe Onorato2010-03-011-5/+6
|
* Add new Slog class.Joe Onorato2010-03-011-13/+22
|
* Bumper un-@hide (un-@pending actually) of previously reviewed APIs:Dan Egnor2010-01-071-3/+0
| | | | | | - new Log methods for reportable conditions - EventLog publication, EventLogTags deprecation - a new stackTrace field in ProcessErrorStateInfo
* DropBox logging of app & system server crashes.Dan Egnor2009-12-211-4/+51
| | | | | | | | | | | The crashes are also reported to the event log (and of course the main logcat, like they always have been). Ordinary Log.e(t,m,e) isn't dropboxed but there's a new Log.wtf() which always is. (Still @pending in this change.) Add a hook to IPowerManager to crash the system server on demand (only for apps with REBOOT permission, since it's basically a restart). This is not exposed in PowerManager, must be invoked directly -- mostly this is there so "Bad Behavior" in dev tools can do it.
* Eliminate CrashData and friends.Dan Egnor2009-12-111-3/+1
| | | | | | | | | | | | | | | | | | (CrashData was a custom-marshalled crash-info class used for a server crash reporting system I am deprecating). Use ApplicationErrorReport.CrashInfo instead to report crash details (mostly the stack trace) from RuntimeInfo to ActivityManagerService, since we're likely to need the crash information in that form anyway. Remove the (long-disabled) flags and support for the "Debug" button in the crash dialog. Further gut the ICheckinService interface by removing the crash-reporting APIs (and everything that calls them), plus the synchronous checkin() method (which has been stubbed out for a while now). A new dropbox-based crash reporting system is in the works, but not part of this change.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+247
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-247/+0
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-151-12/+12
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+247