summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-05-06 08:40:40 -0700
committerMark Salyzyn <salyzyn@google.com>2015-05-13 09:22:51 -0700
commit79c3815ca191033bd97e7d4458970b606f661a18 (patch)
tree85587a97dbbd8fe013534d4b85ff6180f2d5c075 /include
parenta1aacb71f387c91d5fe383b8aaa5b0be2ec9cd3c (diff)
downloadsystem_core-79c3815ca191033bd97e7d4458970b606f661a18.tar.gz
system_core-79c3815ca191033bd97e7d4458970b606f661a18.tar.bz2
system_core-79c3815ca191033bd97e7d4458970b606f661a18.zip
logcat: liblog: Add "usec" format argument
(cherry pick from commit e1f2004ecc05ce2d5d4313d16c7791594643f2ef) - 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
Diffstat (limited to 'include')
-rw-r--r--include/log/logprint.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/log/logprint.h b/include/log/logprint.h
index 1e42b4739..96249e98f 100644
--- a/include/log/logprint.h
+++ b/include/log/logprint.h
@@ -36,7 +36,9 @@ typedef enum {
FORMAT_TIME,
FORMAT_THREADTIME,
FORMAT_LONG,
- FORMAT_COLOR,
+ /* The following two are modifiers to above formats */
+ FORMAT_MODIFIER_COLOR, /* converts priority to color */
+ FORMAT_MODIFIER_TIME_USEC, /* switches from msec to usec time precision */
} AndroidLogPrintFormat;
typedef struct AndroidLogFormat_t AndroidLogFormat;
@@ -56,7 +58,8 @@ AndroidLogFormat *android_log_format_new();
void android_log_format_free(AndroidLogFormat *p_format);
-void android_log_setPrintFormat(AndroidLogFormat *p_format,
+/* currently returns 0 if format is a modifier, 1 if not */
+int android_log_setPrintFormat(AndroidLogFormat *p_format,
AndroidLogPrintFormat format);
/**
@@ -64,7 +67,7 @@ void android_log_setPrintFormat(AndroidLogFormat *p_format,
*/
AndroidLogPrintFormat android_log_formatFromString(const char *s);
-/**
+/**
* filterExpression: a single filter expression
* eg "AT:d"
*
@@ -74,12 +77,12 @@ AndroidLogPrintFormat android_log_formatFromString(const char *s);
*
*/
-int android_log_addFilterRule(AndroidLogFormat *p_format,
+int android_log_addFilterRule(AndroidLogFormat *p_format,
const char *filterExpression);
-/**
- * filterString: a whitespace-separated set of filter expressions
+/**
+ * filterString: a whitespace-separated set of filter expressions
* eg "AT:d *:i"
*
* returns 0 on success and -1 on invalid expression
@@ -92,7 +95,7 @@ int android_log_addFilterString(AndroidLogFormat *p_format,
const char *filterString);
-/**
+/**
* returns 1 if this log line should be printed based on its priority
* and tag, and 0 if it should not
*/
@@ -129,7 +132,7 @@ int android_log_processBinaryLogBuffer(struct logger_entry *buf,
* Returns NULL on malloc error
*/
-char *android_log_formatLogLine (
+char *android_log_formatLogLine (
AndroidLogFormat *p_format,
char *defaultBuffer,
size_t defaultBufferSize,