Commit graph

209 commits

Author SHA1 Message Date
Casey Dahlin
dc42a8734e logcat: Add --regex option
You can now filter log output by a regex on the messages.

Test: New unit test passes
Bug: 27706081
Change-Id: Idfa637f62a25fb1b92e9b49b89572dff0fec6e08
2016-03-25 13:55:29 -07:00
James Hawkins
588a2cad7f system/core: Cleanup direct calls to opendir by containing in a
std::unique_ptr.

Bug: 26643633
Change-Id: Ia3491fdbff086558da694ae949cf08e4c89d0307
2016-02-18 14:52:46 -08:00
Elliott Hughes
b9e53b4d2d Remove logcat's false dependency on a libutils header file.
Change-Id: Idf499d77e88d2ee7d5b1050eaf45ba29481793a4
2016-02-17 11:58:01 -08:00
Mark Salyzyn
d1f41d606b logd: use ro.debuggable instead of ro.build.type
Change-Id: Ic644f1f78e68094f700834675f4acc63386a6b92
2016-02-10 10:23:03 -08:00
Mark Salyzyn
5b89b49fc9 logcat: build cleanup
LOCAL_MODULE_TAGS debug encompasses eng

Bug: 26976972
Change-Id: I44b30f2ebb0173b203bf975f01dfead737b4e5bf
2016-02-04 13:10:19 -08:00
Mark Salyzyn
6de62e52c7 logcatd.rc: only deliver on eng and userdebug
Change-Id: I694d33a041e40fe181d3c2f1c8604765ba29e709
2016-02-04 11:11:52 -08:00
Mark Salyzyn
3bab2a9096 logpersist: missing X
Signed-off-by: LawrenceSY_Kuo@asus.com
Bug: 19608716
Change-Id: I90e0313262a02906dec71417b995fc725f78a292
2015-12-29 07:31:37 -08:00
Mark Salyzyn
8beb0d3ad7 logcat: test: rotated logs can exceed size during crash
Some crash messages can be as large as 4K, so allow
the rotated logs to have a larger size.

Change-Id: I20ef8d526ad2d5eca128d1f99f4ea2d2da426403
2015-12-18 10:35:20 -08:00
Mark Salyzyn
86052a5d4f Merge "logd: liblog: logcat: Add LOG_ID_SECURITY" 2015-12-11 17:33:33 +00:00
Mark Salyzyn
90e7af30a5 liblog: logprint add uid format modifier
Bug: 25996918
Change-Id: Idff5e080fc5c7b69e0c45d3f596eb9d632451cbd
2015-12-09 08:12:07 -08:00
Mark Salyzyn
083b037c07 logd: liblog: logcat: Add LOG_ID_SECURITY
- Largish commit, buffer and access controls done together
- Add LOG_ID_SECURITY binary content log
- Add "default" meta buffer
- allow LOG_ID_SECURITY only from AID_SYSTEM and AID_ROOT UID & GID
- Use __android_log_security() to gate logging
- Add __android_log_security_bwrite() native access to security
  logging.
- Add liblog.__security_buffer end-to-end gTest

Bug: 26029733
Change-Id: Ibcf5b4660c17c1aa6902c0d93f8ffd29c93d9a93
2015-12-08 16:46:29 -08:00
Mark Salyzyn
41ba25f864 logcat: Add --wrap timeout
Always ANDROID_LOG_WRAP_DEFAULT_TIMEOUT seconds (2 hours).
--wrap takes argument, the argument is currently ignored.

Future: Add new API that allows setting of wrap timeout.

Bug: 25929746
Bug: 21615139
Change-Id: Ib441cecfb6e4264c18adb70c705314440ba85e65
2015-12-07 14:24:02 -08:00
Mark Salyzyn
f8bff87c65 logcat: Add low hanging fruit long arguments
Add long arguments file, rotate_kbytes, rotate_count, format,
dividers, clear, buffer_size, last, buffer, binary, statistics
and prune.

Bug: 21615139
Change-Id: Ieb1bbe3d47e6711a1e91c74522630d39f8981621
2015-12-07 14:24:02 -08:00
Kristian Monsen
562e513d4b logcat: Add long arguments to logcat, support for pid filter
Bug: 21615139
Change-Id: I3e63e43067f8089c18658e4100e901fb2a9630ae
2015-12-07 14:24:02 -08:00
Mark Salyzyn
ba7a9a016b logd: liblog: logcat: switch to android_log_clockid() (2)
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I38dee773bf3844177826b03a26b03215c79a5359
2015-12-07 18:45:31 +00:00
Mark Salyzyn
b566435b02 Merge "Revert "logd: liblog: logcat: switch to android_log_clockid()"" 2015-12-07 18:31:44 +00:00
Mark Salyzyn
9e18cdcebd Revert "logd: liblog: logcat: switch to android_log_clockid()"
This reverts commit 77b5696b1d.

Change-Id: I7711bf1a7e3f72ed29a2498d7287b725a0e624bd
2015-12-07 18:30:58 +00:00
Mark Salyzyn
9eca0e775b Merge "logd: liblog: logcat: switch to android_log_clockid()" 2015-12-07 18:16:29 +00:00
Elliott Hughes
4f71319df0 Track rename of base/ to android-base/.
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
2015-12-04 22:00:26 -08:00
Mark Salyzyn
77b5696b1d logd: liblog: logcat: switch to android_log_clockid()
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I3c4e3e6b87f6676950797f1f0e203b44c542ed43
2015-12-04 14:49:19 -08:00
Mark Salyzyn
b6bee33182 liblog: logd: support logd.timestamp = monotonic
if ro.logd.timestamp or persist.logd.timestamp are set to the value
monotonic then liblog writer, liblog printing and logd all switch to
recording/printing monotonic time rather than realtime. If reinit
detects a change for presist.logd.timestamp, correct the older entry
timestamps in place.

ToDo: A corner case condition where new log entries in monotonic time
      occur before logd reinit detects persist.logd.timestamp, there
      will be a few out-of-order entries, but with accurate
      timestamps. This problem does not happen for ro.logd.timestamp
      as it is set before logd starts.

NB: This offers a nano second time accuracy on all log entries
    that may be more suitable for merging with other system
    activities, such as systrace, that also use monotonic time. This
    feature is for debugging.

Bug: 23668800
Change-Id: Iee6dab7140061b1a6627254921411f61b01aa5c2
2015-11-03 15:15:51 -08:00
Mark Salyzyn
9d4203aae1 Merge changes Iefbea3b1,Ieb924b6d
am: bb51fbc4d4

* commit 'bb51fbc4d4b311ae315e4d7dd174167ebeadc2a8':
  liblog: add android_log_timestamp() private function
  liblog: logcat: add epoch and monotonic format modifiers
2015-10-29 23:05:33 +00:00
Mark Salyzyn
4cbed02e44 liblog: logcat: add epoch and monotonic format modifiers
- '-v epoch' prints seconds since Jan 1 1970
- '-v monotonic' print cpu seconds since start of device
- '-T sssss.mmm...' as alternate tail time format

NB: monotonic is a best estimate and may be out by a few ms
    given the synchronization source clue accuracy.

Bug: 23668800
Change-Id: Ieb924b6d3817669c7e53beb9c970fb626eaad460
2015-10-29 14:23:42 -07:00
Bill Yi
27bdd9a71c Merge commit '2b88845e4d7ae862d9735eec3c03d633d4f1d58d' into HEAD 2015-10-08 10:37:51 -07:00
Mark Salyzyn
603b8e50c8 logcat: do not exit buffer loop on error
- Alter logcat to collect error(s) for open, clear, get size or set
  size; moving on to other buffer ids. Then after loop completed,
  report and exit for the last error reported.

Bug: 23711431
Change-Id: I63a729d27544ea8d5c6119625c1de0210be0eb70
2015-10-07 16:23:54 -07:00
Mark Salyzyn
07c50b02d7 am 58b136cb: Merge "logcat: continue where we left off"
* commit '58b136cbebe8526134ea9d7e89835b523f1cbe2e':
  logcat: continue where we left off
2015-10-07 14:36:30 +00:00
Mark Salyzyn
9812fc4bd0 logcat: continue where we left off
Issue introduced as part of new logcatd functionality in
commit f3555d9427

Faulty logic, add a gTest to confirm.

Bug: 19608716
Change-Id: Ic1b97def25e03e69faae4398a3dff2ff0f88545e
2015-10-06 12:46:54 -07:00
Mark Salyzyn
2ba96324a4 am 351c211c: am 447356dd: Merge "liblog: logcat: Add year and zone to date on each line"
* commit '351c211cc1bba3842c3e9d782888fdeec3adbd24':
  liblog: logcat: Add year and zone to date on each line
2015-09-30 20:11:42 +00:00
Mark Salyzyn
f28f6a9ba2 liblog: logcat: Add year and zone to date on each line
- '-v year' modifier adds the four digit year prefix
- '-v <timezone>' modifier sets and prints the timezone suffix
- Only promise in logcat to support UTC as a timezone since
  all others are based on the configured environment
- '-v zone' modifier toggles the timezone suffix on or off
- '-T YYYY-MM-DD HH:MM:SS.mmm...' format is added

Bug: 23668700
Change-Id: I7521c1efb7455dc9a25434fce72a69a65dcf72ea
2015-09-24 14:49:55 -07:00
Mark Salyzyn
3cbc7e7eaa am 6e78a2c5: am 6eec17e3: Merge "logcatd: up size from 16MB to 256MB"
* commit '6e78a2c5b6a052043b01ba36de21e7aec49c8735':
  logcatd: up size from 16MB to 256MB
2015-09-22 00:45:39 +00:00
Mark Salyzyn
44a34e4525 am 96f1b63a: am 44210dfe: Merge "logpersist: bundle with logcatd service"
* commit '96f1b63a916a86774780bc9e15ac857ac3dd6fde':
  logpersist: bundle with logcatd service
2015-09-21 22:31:59 +00:00
Tom Cherry
984bd8323d resolved conflicts for 5caca3dd to mnc-dr-dev-plus-aosp
Change-Id: I773e514a8232b77cdd566dc36c9efc4e15f206f0
2015-09-21 14:25:34 -07:00
Mark Salyzyn
3ffbdb9009 logcatd: up size from 16MB to 256MB
Change-Id: Ic151d42151efdb3103470ba46c626a800cf29125
2015-09-21 13:53:16 -07:00
Mark Salyzyn
8c943b6dc8 logpersist: bundle with logcatd service
Bug: 23186545
Change-Id: I130d7c7e120acb372e58aec028f39e161d53628e
2015-09-21 13:53:01 -07:00
Tom Cherry
20391b1de5 bundle init.rc contents with its service
Bug: 23186545
Change-Id: I52616b8ab1165fdef716f9b8f958665f2308c12e
2015-08-21 10:14:43 -07:00
Riley Andrews
aede9897df Lower the priority of the threads in logd/logcat.
(cherry pick from commit d98f4e8af5)

sched_batch implies only a penalty to latency in scheduling, but
does not imply that the process will be given less cpu time. Increase
the nice level to 10 to prioritize it below ui threads.

Bug: 21696721
Change-Id: I075af059dc755402f7df9b0d7a66cca921ff04b2
2015-06-09 12:40:20 -07:00
Riley Andrews
d98f4e8af5 Lower the priority of the threads in logd/logcat.
sched_batch implies only a penalty to latency in scheduling, but
does not imply that the process will be given less cpu time. Increase
the nice level to 10 to prioritize it below ui threads.

Bug: 21696721
Change-Id: I075af059dc755402f7df9b0d7a66cca921ff04b2
2015-06-09 12:36:45 -07:00
Mark Salyzyn
5d332907f0 liblog: logcat: Add printable format modifier
(cherry pick from commit b932b2f8ba)

- added printable format modifier:
  logcat -v printable
- opencoded borrowed individual utf8 validity checking algorithm
  from utf8_length() in libutils/Unicode.cpp
- if considered basic one-character ASCII, use popular \x escape
  sequences for non-printable
- logprint convert to C comments to drop mixed-mode

Bug: 19000361
Change-Id: I122a5b8fb41216fc0bc816178c0b768f3df56586
2015-06-04 08:37:14 -07:00
Mark Salyzyn
b932b2f8ba liblog: logcat: Add printable format modifier
- added printable format modifier:
  logcat -v printable
- opencoded borrowed individual utf8 validity checking algorithm
  from utf8_length() in libutils/Unicode.cpp
- if considered basic one-character ASCII, use popular \x escape
  sequences for non-printable
- logprint convert to C comments to drop mixed-mode

Bug: 19000361
Change-Id: I122a5b8fb41216fc0bc816178c0b768f3df56586
2015-06-04 08:27:29 -07:00
Mark Salyzyn
cdb468abb3 logcat: -f run in background
(cherry pick from commit 3ef730c57f)

- if saving to file, set SP_BACKGROUND policy
- if saving to file, set BATCH priority
- sort include files

Bug: 19608716
Change-Id: I00acb8b8db0d2ff9ff36c97f9e74604d31938376
2015-06-02 15:27:41 -07:00
Mark Salyzyn
117c322040 logcat: -f flag to continue
(cherry pick from commit f3555d9427)

On startup, check the current logging content, then grab logs from
that time forward rather than restarting from the beginning. Add
support for reading tail time down to the nano-second.

Bonus, permits us to create a logcatd logpersist daemon

Bug: 19608716
Change-Id: Iaab58de4c02b7f97c69de12cf954fedc2163059e
2015-06-02 15:26:53 -07:00
Mark Salyzyn
3ef730c57f logcat: -f run in background
- if saving to file, set SP_BACKGROUND policy
- if saving to file, set BATCH priority
- sort include files

Bug: 19608716
Change-Id: I00acb8b8db0d2ff9ff36c97f9e74604d31938376
2015-06-02 14:56:44 -07:00
Mark Salyzyn
f3555d9427 logcat: -f flag to continue
On startup, check the current logging content, then grab logs from
that time forward rather than restarting from the beginning. Add
support for reading tail time down to the nano-second.

Bonus, permits us to create a logcatd logpersist daemon

Bug: 19608716
Change-Id: Iaab58de4c02b7f97c69de12cf954fedc2163059e
2015-06-02 14:56:44 -07:00
Mark Salyzyn
79c3815ca1 logcat: liblog: Add "usec" format argument
(cherry pick from commit e1f2004ecc)

- Add additional 3 digits of time precision for time output
  adding in the reporting of usec
- Remove trailing space in header file

Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
2015-05-13 09:22:51 -07:00
Mark Salyzyn
e1f2004ecc logcat: liblog: Add "usec" format argument
- Add additional 3 digits of time precision for time output
  adding in the reporting of usec
- Remove trailing space in header file

Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
2015-05-12 15:51:46 -07:00
Jeff Brown
44193d9eae Add float support to binary event log.
Bug: 20664753
Change-Id: Ib4752bd785496dab5bb4d4979d5d80f662adbdfa
2015-04-28 18:20:48 -07:00
Jeff Brown
b1993b637f Add float support to binary event log.
Bug: 20664753
Change-Id: Ib4752bd785496dab5bb4d4979d5d80f662adbdfa
2015-04-28 17:52:37 -07:00
Mark Salyzyn
77d7e81c1c logcat: build regression
printflike checks for NULL fmt at compile time, checks for
NULL at runtime are optimized out. Regression as a result
of commit 5976303aa6.

Change-Id: Ia4e7ee4b6cb2adf1e6609c70e79684855f76e6fc
2015-04-13 09:27:57 -07:00
Traian Schiau
5976303aa6 logcat: Minor fixes
Remove -r default value implementation (since is not functional).
Check the status of some memory allocations.
Make sure that the pruning buffer is set to NULL if we get to the end of  the loop.
Make sure that the file status is successfully retrieved before using the size.
Add strtouia - string to unsigned argument.
Add logcat_panic with/without printing an error message and help.
Play nicer with the android namespace.

Change-Id: Id4c37cf64968128424e29bf1725f6c9a5924a0e2
Signed-off-by: Traian Schiau <traianx.schiau@intel.com>
2015-04-11 17:27:11 +03:00
Elliott Hughes
bcc2b5f44a Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.
Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
2015-04-02 14:31:07 -07:00
Mark Salyzyn
54c22e5b0a Merge "logcat: test: logcat.logrotate fails" 2015-03-12 20:15:17 +00:00
Mark Salyzyn
9c51243d8b logcat: test: logcat.logrotate fails
Test did not handle all possible multiples of block sizes.

Bug: 19604106
Change-Id: I693358be9598926389631baf21c5883e0f2fd735
2015-03-12 20:11:36 +00:00
Mark Salyzyn
bba894af3f logcat: fortify help on filterspec
Bug: 19620794
Change-Id: I572ffb62d39d884d5102b0846a95b1a8216f3d41
2015-03-09 09:57:25 -07:00
Mark Salyzyn
5f6738af48 logcat: remove dead label code
Change-Id: I12d6aa4ebf48f06faf9435b4ffedfd309629cf3b
2015-03-04 13:21:42 -08:00
Mark Salyzyn
9421b0c060 logcat: do not stop on unexpected log ID
We are changing the log read API to allow event notification
regarding logging system data loss. We would like these out
of band events to be reported.

Change-Id: I9e802113604d8cc0fc9adff0d1e014bbc40914fe
2015-03-04 13:21:42 -08:00
Mark Salyzyn
7c975ac3a4 logcat: add pstore read
Used to pull the Android log messages after a reboot.
A companion to the pstore console logs. Adding the -L
flag triggers this behavior.

Change-Id: Icce2dc00bcbb26975bea604420c6be397869e804
2015-02-26 07:22:15 -08:00
Mark Salyzyn
7b30ff8d87 logcat: Add -D print dividers flag
Permits a single thread to collect several log buffer and
to separate them out into named buckets by keying off the
dividers ---------

Change-Id: I5a92c67383a73ea566cb9b9732d26d88d9c41c66
2015-02-25 23:03:40 +00:00
Mark Salyzyn
2d3f38a6b8 liblog: introduce ANDROID_LOG_* flags
Move away from using POSIX open(2) flags and introduce ANDROID_LOG_* flags to
replace them. Add security by preventing random mode flags from getting into
underlying POSIX calls. ANDROID_LOG_* flags overlap POSIX O_* flag definitions.

Change-Id: Ib32bb64c287e8bf150be62242e1ba46bb37839fc
2015-02-25 17:44:18 +00:00
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
Bernhard Rosenkränzer
1eca6a91a1 Remove unused variable
Change-Id: Ifba91dd93a9c8170f8837c413756554e117be894
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-24 20:01:45 +00:00
Aristidis Papaioannou
ffb60ce6b3 am 91b76d7d: Merge "Made suffix length of rotated logcat files constant."
* commit '91b76d7de3029f6e617d640ca1b9ef844fa44477':
  Made suffix length of rotated logcat files constant.
2014-10-29 15:33:34 +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
508a897634 am b210403a: am 98d3aa3f: Merge "logcat: tests: deal with -v threadtime default"
* commit 'b210403a8bf417e9f88bcca0a2a652d533f6c524':
  logcat: tests: deal with -v threadtime default
2014-09-18 17:47:29 +00:00
Mark Salyzyn
a5e2429f09 logcat: tests: deal with -v threadtime default
- specify -v brief where necessary to preserve tests
- fix an occasional issue for logrotate and device block size

Change-Id: I09b02cc0359dc351a89311abc3ee762a0f23582c
2014-09-18 10:25:38 -07:00
Mark Salyzyn
0537416da5 am a9d789dd: am a3e53f1d: Merge "logcat: -v format defaults to threadtime"
* commit 'a9d789dd8a7c1cfe58793d77af80bb457fca3cf2':
  logcat: -v format defaults to threadtime
2014-09-16 19:42:53 +00:00
Mark Salyzyn
649fc605f8 logcat: -v format defaults to threadtime
Change-Id: Iafddf83b0507a667e0395d38ec9afaed67319018
2014-09-16 09:27:37 -07:00
Mark Salyzyn
abc75368a8 am e70851f8: am f9b9693b: Merge "liblog: logcat: colored output."
* commit 'e70851f8a8aa4c9dfaa442abf812c283ba8d8b6f':
  liblog: logcat: colored output.
2014-09-12 20:08:47 +00: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
8149603192 am 3888a4d0: am 35a76df5: Merge "logcat: document help tail from time"
* commit '3888a4d07f7341c103c618f331fb04d93d9c532b':
  logcat: document help tail from time
2014-09-02 22:02:52 +00: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
d5c417469b logcat: test: logrotate flags
- test -f -n and -r flags
- fix issue with parse error for sizes in bytes (no multiplier)

(cherry pick from d03caa23dd)

Bug: 16147190
Change-Id: Iadf2fd903d5e881d02f1d2b491441cc8090ee1c9
2014-07-24 22:20:51 +00:00
Mark Salyzyn
d03caa23dd logcat: test: logrotate flags
- test -f -n and -r flags
- fix issue with parse error for sizes in bytes (no multiplier)

Bug: 16147190
Change-Id: Iadf2fd903d5e881d02f1d2b491441cc8090ee1c9
2014-07-24 22:14:11 +00: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
42461b7a59 am 9a357b88: am badc23f8: am f6ef1f53: Merge "logcat: parse failure for -n <KBsize> and -r <rotate limit>"
* commit '9a357b884fcc46f10f16860987614a2b9b610208':
  logcat: parse failure for -n <KBsize> and -r <rotate limit>
2014-07-07 18:22:43 +00:00
Mark Salyzyn
025133a8db am 4700dfa0: am 8d782f51: am 3f55d2f4: Merge "logcat: test: modernize"
* commit '4700dfa0fbb9be31809b250c001d0275ce0b38dc':
  logcat: test: modernize
2014-06-18 21:40:30 +00:00
Mark Salyzyn
9879ac8e12 logcat: test: modernize
- split sequential sort output test out as a benchmark check
- Allow up to two failures of sort results because of occasional reader locks.
- logcat -g output was changed to handle wider set of values incorporating a
  multiplier for UX, and would not pass test if 'logcat -G 1M' was run.
- If spam filter is turned off, prune checks would fail, allowed for an
  empty default.

Change-Id: I06d6089e18279df7525d1c16a1f76b3125ddbf05
2014-06-18 13:18:17 -07:00
William Luh
66929dbe1b Add event log tag for Safety Net.
This is for clients who log to EventLog and want Safety Net to
pick up and send the logs.

Bug:15572351
Change-Id: I6fdbe7905ec8b3b27a36eb38aee61c97bcd8d4bf
2014-06-17 10:05:47 -07: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
Ying Wang
9f437d7181 Remove unused LOCAL_LDLIBS.
Change-Id: I42aeb7668183e7a06207ee063f6eee4d37d66c6e
2014-05-07 15:36:05 -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
ef7c411ac3 logcat: test arbitrary time to tail
- Add tail_time
- Use EXPECT instead of ASSERT to provide more coverage
- Use EXPECT_TRUE/ASSERT_TRUE when comparing NULL
- Itemize order complaints in sorted_order test

Change-Id: I55a7543fa3300c0a9524fac70111e680c2877eea
2014-03-26 10:52:21 -07:00
Mark Salyzyn
5fef7b6e31 logcat: timed tests fail under load
Change-Id: Ic1cdf0509617720eef7a3ad0b17a3b6f88c9d87e
2014-03-24 13:19:17 -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
95cfc7b8e2 logcat: test White Black list
Change-Id: Ia9509ad09dd86e4d9169ed7d0b33911f1ca9eec6
2014-03-14 10:24:42 -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
9b986497e7 logcat: test: add clear and blocking check
(cherry picked from commit 1beb2ab6f6)

Change-Id: I243b1338c4a5935a297a0519c03697fd828e47e6
2014-02-26 09:52:02 -08: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
William Luh
5336758595 Add new cert_pin_failure tag that can be used in user-consent filtering.
Bug: 10912373
Change-Id: If8a2f9829b3aac4abc33a4623c5f5b4966fd6870
2013-09-25 22:20:23 +00:00