summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-04-21 20:13:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-21 20:13:15 +0000
commit088c4f3b8a0933fd6b3262764b54f4751155c7d1 (patch)
treee36aefcc83dff97ac158e5e5e4eb6180d6def8e8
parent82b0f7ba9258c74e4019b2b6478d2e1623a287d9 (diff)
parent5720d2c168f17afb57eefb6ed762a120a24c8ecb (diff)
downloadsystem_core-088c4f3b8a0933fd6b3262764b54f4751155c7d1.zip
system_core-088c4f3b8a0933fd6b3262764b54f4751155c7d1.tar.gz
system_core-088c4f3b8a0933fd6b3262764b54f4751155c7d1.tar.bz2
Merge "logd: Statistics headers"
-rw-r--r--logd/LogStatistics.cpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/logd/LogStatistics.cpp b/logd/LogStatistics.cpp
index 0801fe8..eadc4dd 100644
--- a/logd/LogStatistics.cpp
+++ b/logd/LogStatistics.cpp
@@ -328,22 +328,32 @@ void LogStatistics::format(char **buf, uid_t uid, unsigned int logMask) {
}
if (!headerPrinted) {
+ output.appendFormat("\n\n");
+ android::String8 name("");
if (uid == AID_ROOT) {
- output.appendFormat(
- "\n\nChattiest UIDs in %s:\n",
+ name.appendFormat(
+ "Chattiest UIDs in %s log buffer:",
android_log_id_to_name(id));
} else {
- output.appendFormat(
- "\n\nLogging for your UID in %s:\n",
+ name.appendFormat(
+ "Logging for your UID in %s log buffer:",
android_log_id_to_name(id));
}
- android::String8 name("UID");
android::String8 size("Size");
android::String8 pruned("Pruned");
if (!worstUidEnabledForLogid(id)) {
pruned.setTo("");
}
format_line(output, name, size, pruned);
+
+ name.setTo("UID PACKAGE");
+ size.setTo("BYTES");
+ pruned.setTo("LINES");
+ if (!worstUidEnabledForLogid(id)) {
+ pruned.setTo("");
+ }
+ format_line(output, name, size, pruned);
+
headerPrinted = true;
}
@@ -380,15 +390,22 @@ void LogStatistics::format(char **buf, uid_t uid, unsigned int logMask) {
}
if (!headerPrinted) {
+ output.appendFormat("\n\n");
+ android::String8 name("");
if (uid == AID_ROOT) {
- output.appendFormat("\n\nChattiest PIDs:\n");
+ name.appendFormat("Chattiest PIDs:");
} else {
- output.appendFormat("\n\nLogging for this PID:\n");
+ name.appendFormat("Logging for this PID:");
}
- android::String8 name(" PID/UID");
android::String8 size("Size");
android::String8 pruned("Pruned");
format_line(output, name, size, pruned);
+
+ name.setTo(" PID/UID COMMAND LINE");
+ size.setTo("BYTES");
+ pruned.setTo("LINES");
+ format_line(output, name, size, pruned);
+
headerPrinted = true;
}