diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-04-21 22:44:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-21 22:44:01 +0000 |
commit | f2cd84d37c1837f6dabf5ca24b57d58be75c28f0 (patch) | |
tree | e36aefcc83dff97ac158e5e5e4eb6180d6def8e8 | |
parent | fade90ac206c02623208bc8341f5164554593bf3 (diff) | |
parent | 088c4f3b8a0933fd6b3262764b54f4751155c7d1 (diff) | |
download | system_core-f2cd84d37c1837f6dabf5ca24b57d58be75c28f0.zip system_core-f2cd84d37c1837f6dabf5ca24b57d58be75c28f0.tar.gz system_core-f2cd84d37c1837f6dabf5ca24b57d58be75c28f0.tar.bz2 |
am 088c4f3b: Merge "logd: Statistics headers"
* commit '088c4f3b8a0933fd6b3262764b54f4751155c7d1':
logd: Statistics headers
-rw-r--r-- | logd/LogStatistics.cpp | 33 |
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; } |