Commit graph

37 commits

Author SHA1 Message Date
Mark Salyzyn
d0bd1b1b58 logcat: use liblog to determine -b all list
- This is done to prevent the administrivia of adjusting
  logcat sources every time a new log id is added.

Change-Id: I0074afb00694c2c00f6c3a66e58c15691146a6c5
2014-12-05 20:14:30 +00:00
Aristidis Papaioannou
eba7344fc1 Made suffix length of rotated logcat files constant.
The suffix now uses as many digits as needed to cover the maximum number
of rotated files.

eg, for 20 files it would use 2 digits: log_file.{01,02,03,...,20}

Change-Id: I4709b3cf4bf88c209db3c4d9e24a3a4731c98bae
2014-10-29 15:00:54 +00:00
Mark Salyzyn
649fc605f8 logcat: -v format defaults to threadtime
Change-Id: Iafddf83b0507a667e0395d38ec9afaed67319018
2014-09-16 09:27:37 -07:00
Pierre Zurek
ead88fca6e liblog: logcat: colored output.
This patch adds a new '-v color' option to logcat so that the output is
colored similar to the ones in DDMS. Simply type "adb logcat -v color"
to use it. Works well with bash in gnome-terminal. NO GUARANTEE IT WILL
WORK ON A NON xterm STYLE TERMINAL.

Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Change-Id: I9189c5f27fed991579edbcbc6834536eb8112152
2014-09-11 19:04:17 -07:00
Mark Salyzyn
190b7ac9d2 logcat: document help tail from time
(cherry picked from commit 6a594683ec)

Bug: 17323719
Change-Id: Id057dde60e699c946828f4aeabedf1728b3bc877
2014-09-01 11:45:53 -07:00
Mark Salyzyn
0b2dac4f3f logcat: parse failure for -n <KBsize> and -r <rotate limit>
Bug: https://code.google.com/p/android/issues/detail?id=72867
Change-Id: Id0c988543ecfccc5054d15d4195ef578468d50af
2014-07-07 18:04:32 +00:00
Mark Salyzyn
e4369d68a2 logd: logcat: debuggerd: audit logs to events and main
- auditd spawn log copy to events and main
- logcat delete events as one of the default logs
- debuggerd do not collect events.
- squish multiple spaces
- switch from strcpy to memmove for overlapping buffers

BUG: 14626551
Change-Id: I89b30273ce931ed2b25a53ea9be48e77f4c1bbf4
2014-05-27 14:29:56 -07:00
Mark Salyzyn
989980c55d logd: logcat: debuggerd: auditd logs to events
- auditd switch to recording logs to events log id
- logcat add events as one of the default logs
- debuggerd collect events log as well.

ToDo: debuggerd & bugreport collect intermixed logs.

BUG: 14626551
Change-Id: I958f0e729b7596748be57488a38824db5645be7b
2014-05-15 08:50:50 -07:00
Mark Salyzyn
671e343c7d logd: logcat: Add persist.logd.size group of properties
- logd Add persist.logd.size (global), persist.logd.size.<logid>
- logcat report a more flexible multiplier in -g command.

Bug: 14563261
Bug: 14469172
Change-Id: Ie389caa14ad3ae3d4a3a3cc463425bb9dbc5e483
2014-05-06 14:58:41 -07:00
Mark Salyzyn
5045f57525 liblog: logcat: Move library print test into gTest
Change-Id: Icd33808d4c974625f4fd0a126a90a2b4c90c8315
2014-05-02 14:16:00 -07:00
Mark Salyzyn
b149e245c8 logcat: turn on -Werror
- Deal with some -Wunused issues

Change-Id: Ic4ab9a49f13e156a73d40266e413dee3e6396178
2014-05-02 14:15:59 -07:00
Mark Salyzyn
99f47a9e7c logd: liblog: logcat: debuggerd: Add LOG_ID_CRASH
Change-Id: Iea453764a1a4fc1661f461f10c641c30150e4d20
2014-04-16 15:38:50 -07:00
Mark Salyzyn
bbbe14f758 logcat: Better help message for white and black list
Change-Id: Ia739260b4e0fcf8062ad9166fd65b1d6e7bb446c
2014-04-11 13:49:43 -07:00
Mark Salyzyn
1c95047939 logd: liblog: logcat: enable prune features for user
- Enable whitelist, blacklist and logsize tuneables for user

Change-Id: Id0c283844c71c5263a8cfbebf2e550f7ac415858
2014-04-02 13:12:04 -07:00
Mark Salyzyn
22e287df0d logcat: white and blacklist failure
- logcat improperly squashes out count
- logcat test enhanced to catch failure
- logd places entries in ascending sorted order

Change-Id: If39d8e2c40852b520c98e7840034ab63c2538e5d
2014-03-21 15:43:31 -07:00
Mark Salyzyn
fff04e3014 logcat: improve error messages
Bug: 13464830
Change-Id: Ia8783fa2422e444bcdfca8d0153cf6e7634612bb
2014-03-18 09:43:03 -07:00
Mark Salyzyn
fa3716b250 logd: liblog: logcat: Arbitrary time to tail
Change-Id: I10e8d92c933e31ee11e78d2d1114261a30c4be0e
2014-03-14 10:23:51 -07:00
Mark Salyzyn
dfa7a07f5b logd: liblog: logcat: Add LogWhiteBlackList
- liblog android_logger_get_log_size and android_logger_get_readable_size
  adjusted to return long instead of int because of -G flag extending range

NB: ifdef'd only for userdebug and eng builds

- liblog Add android_logger_[sg]et_prune_list and android_logger_set_log_size
- logcat Add -P, -p and -G flags
- logd Add LogWhiteBlackList and configurable log size

(cherry picked from commit 18a5432158)

Change-Id: I1572338c1b34bd968ad7867857ef708156ec3b6a
2014-03-13 14:48:07 -07:00
Mark Salyzyn
34facab86b logd: liblog: logcat: Add Statistics
- logd add statistical collection and formatting
- liblog add android_logger_get_statistics call
- logcat add -S flag
- logcat add -b all

(cherry picked from commit 51a29c8dc4)

Change-Id: I521753b1969ecd4590c956aeeb1557d101059d67
2014-03-13 14:47:58 -07:00
Mark Salyzyn
5d3d1f17db logcat: Add -T flag (-t w/o assumption of -d)
(cherry picked from commit de02546e3d)

Change-Id: I49763e2db83755e0b7b12dfa3f83a3957c54d389
2014-01-27 15:19:17 -08:00
Mark Salyzyn
65772ca7d7 logcat: Add logcat test suite
(cherry picked from commit 2807db9a26)

Change-Id: Ic4c84b88b8d899965c9765bdc3ee223ef73ba7d1
2014-01-27 15:18:49 -08:00
Mark Salyzyn
95132e97e5 logcat: Incorporate liblog reading API
(cherry picked from commit a1062c728a)

Change-Id: I1e1a55d13ac55350e8d54bfe92b392de07f26a5d
2014-01-27 15:11:46 -08:00
Elliott Hughes
ccecf14254 system/core 64-bit cleanup.
This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.

Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
2014-01-16 12:54:18 -08:00
Colin Cross
9227bd3855 Move liblog headers to system/core/include/log
Move the liblog headers to log/ instead of cutils/ to complete
the separation of libcutils and liblog.  cutils/log.h still
exists and includes log/log.h in order to support the many existing
modules that use cutils/log.h.

Change-Id: I2758c9f4aedcb809ca7ba8383d0f55041dd44345
2013-07-24 12:32:39 -07:00
Edwin Vane
80b221cb22 Fixed an unused param warning in logcat
Changed a function to actually use its parameter instead of a global
variable. All callers of the function pass the global variable as an
argument anyway so behaviour is unchanged.

Change-Id: Ib84d45c17d2213c4d441bf2f423feca14e7aa2f4
Author: Edwin Vane <edwin.vane@intel.com>
Reviewed-by: Ariel J Bernal <ariel.j.bernal@intel.com>
2012-08-13 12:59:36 -04:00
Nick Kralevich
274c31ab6b fix "logcat -c ; logcat -d" hang.
Change-Id: I1dc3633fc7228a6ff8ed0da4572f40055a28ceb2
2012-02-23 14:48:51 -08:00
Nick Kralevich
46070505e7 logcat: add sanity check
Sanity check that the length we get back from the kernel matches
how much data we actually received.

Change-Id: I5cfd80321ab41459bb514dfde2da57413a7bd9e6
2011-10-17 11:40:06 -07:00
Kenny Root
4bf3c02e02 Add checking for log entry format
The log tag may be zero length if corrupted, so check for this
condition.

Change-Id: I7616226dabe78a85859b0ab53aca08f734dbdd84
2011-10-03 14:14:41 -07:00
Wink Saville
ba9608ff63 Update the help text to reflect new capabilities of -b parameter.
The -b parameter now support specifying multiple ring buffers
and the results are interleaved. In addition a new ring buffer
has been created, 'system', and the default is now -b main -b system.

Change-Id: Ibc25a31fb8fe21d75dda4598a83cf3426f759eb1
2010-06-18 10:15:08 -07:00
Mathias Agopian
50844525a3 fix [2483384] logcat crash when malloc debug is enabled
fix a couple of uninitialized variables

Change-Id: I1f7552ecb20d85dbf0fec5cae9778a70ff9281a2
2010-03-17 16:10:26 -07:00
Dan Egnor
d1d3b6dbed Add '-t N' flag to logcat, to print only the last N lines of logcat
(to be used in capturing a merged mini logcat for crash reports)

Change-Id: I68149eb80f2f79812f43b07d80fbea822476859e
2010-03-11 20:32:17 -08:00
Joe Onorato
e2bf2ea4d2 Make logcat print both the main and system buffers by default. Make SLOGx macros work. 2010-03-01 13:03:19 -08:00
Joe Onorato
6fa09a066d Allow logcat to take multiple -b options, and interleave the results. 2010-02-26 11:07:00 -08:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
1b8e5a6b14 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:54 -08:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00