summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'liblog/logprint.c')
-rw-r--r--liblog/logprint.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/liblog/logprint.c b/liblog/logprint.c
index 3bc9f5a67..08e830acc 100644
--- a/liblog/logprint.c
+++ b/liblog/logprint.c
@@ -17,14 +17,14 @@
17 17
18#define _GNU_SOURCE /* for asprintf */ 18#define _GNU_SOURCE /* for asprintf */
19 19
20#include <arpa/inet.h>
21#include <assert.h>
20#include <ctype.h> 22#include <ctype.h>
21#include <stdio.h>
22#include <errno.h> 23#include <errno.h>
23#include <stdlib.h>
24#include <stdint.h> 24#include <stdint.h>
25#include <stdio.h>
26#include <stdlib.h>
25#include <string.h> 27#include <string.h>
26#include <assert.h>
27#include <arpa/inet.h>
28 28
29#include <log/logd.h> 29#include <log/logd.h>
30#include <log/logprint.h> 30#include <log/logprint.h>
@@ -52,15 +52,7 @@ static FilterInfo * filterinfo_new(const char * tag, android_LogPriority pri)
52 return p_ret; 52 return p_ret;
53} 53}
54 54
55static void filterinfo_free(FilterInfo *p_info) 55/* balance to above, filterinfo_free left unimplemented */
56{
57 if (p_info == NULL) {
58 return;
59 }
60
61 free(p_info->mTag);
62 p_info->mTag = NULL;
63}
64 56
65/* 57/*
66 * Note: also accepts 0-9 priorities 58 * Note: also accepts 0-9 priorities
@@ -139,23 +131,6 @@ static android_LogPriority filterPriForTag(
139 return p_format->global_pri; 131 return p_format->global_pri;
140} 132}
141 133
142/** for debugging */
143static void dumpFilters(AndroidLogFormat *p_format)
144{
145 FilterInfo *p_fi;
146
147 for (p_fi = p_format->filters ; p_fi != NULL ; p_fi = p_fi->p_next) {
148 char cPri = filterPriToChar(p_fi->mPri);
149 if (p_fi->mPri == ANDROID_LOG_DEFAULT) {
150 cPri = filterPriToChar(p_format->global_pri);
151 }
152 fprintf(stderr,"%s:%c\n", p_fi->mTag, cPri);
153 }
154
155 fprintf(stderr,"*:%c\n", filterPriToChar(p_format->global_pri));
156
157}
158
159/** 134/**
160 * returns 1 if this log line should be printed based on its priority 135 * returns 1 if this log line should be printed based on its priority
161 * and tag, and 0 if it should not 136 * and tag, and 0 if it should not
@@ -234,7 +209,6 @@ AndroidLogPrintFormat android_log_formatFromString(const char * formatString)
234int android_log_addFilterRule(AndroidLogFormat *p_format, 209int android_log_addFilterRule(AndroidLogFormat *p_format,
235 const char *filterExpression) 210 const char *filterExpression)
236{ 211{
237 size_t i=0;
238 size_t tagNameLength; 212 size_t tagNameLength;
239 android_LogPriority pri = ANDROID_LOG_DEFAULT; 213 android_LogPriority pri = ANDROID_LOG_DEFAULT;
240 214
@@ -718,7 +692,6 @@ char *android_log_formatLogLine (
718#endif 692#endif
719 struct tm* ptm; 693 struct tm* ptm;
720 char timeBuf[32]; 694 char timeBuf[32];
721 char headerBuf[128];
722 char prefixBuf[128], suffixBuf[128]; 695 char prefixBuf[128], suffixBuf[128];
723 char priChar; 696 char priChar;
724 int prefixSuffixIsHeaderFooter = 0; 697 int prefixSuffixIsHeaderFooter = 0;
@@ -817,7 +790,6 @@ char *android_log_formatLogLine (
817 /* the following code is tragically unreadable */ 790 /* the following code is tragically unreadable */
818 791
819 size_t numLines; 792 size_t numLines;
820 size_t i;
821 char *p; 793 char *p;
822 size_t bufferSize; 794 size_t bufferSize;
823 const char *pm; 795 const char *pm;