Android-cuttlefish cvd tool
Classes | Macros | Typedefs | Enumerations | Functions
log.h File Reference
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/cdefs.h>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __android_log_message
 

Macros

#define __INTRODUCED_IN(x)
 

Typedefs

typedef enum android_LogPriority android_LogPriority
 
typedef int int void enum log_id log_id_t
 
typedef void(* __android_logger_function) (const struct __android_log_message *log_message)
 
typedef void(* __android_aborter_function) (const char *abort_message)
 

Enumerations

enum  android_LogPriority {
  ANDROID_LOG_UNKNOWN = 0 , ANDROID_LOG_DEFAULT , ANDROID_LOG_VERBOSE , ANDROID_LOG_DEBUG ,
  ANDROID_LOG_INFO , ANDROID_LOG_WARN , ANDROID_LOG_ERROR , ANDROID_LOG_FATAL ,
  ANDROID_LOG_SILENT
}
 
enum  log_id {
  LOG_ID_MIN = 0 , LOG_ID_MAIN = 0 , LOG_ID_RADIO = 1 , LOG_ID_EVENTS = 2 ,
  LOG_ID_SYSTEM = 3 , LOG_ID_CRASH = 4 , LOG_ID_STATS = 5 , LOG_ID_SECURITY = 6 ,
  LOG_ID_KERNEL = 7 , LOG_ID_MAX , LOG_ID_DEFAULT = 0x7FFFFFFF
}
 

Functions

int __android_log_write (int prio, const char *tag, const char *text)
 
int __android_log_print (int prio, const char *tag, const char *fmt,...) __attribute__((__format__(printf
 
int int __android_log_vprint (int prio, const char *tag, const char *fmt, va_list ap) __attribute__((__format__(printf
 
int int void __android_log_assert (const char *cond, const char *tag, const char *fmt,...) __attribute__((__noreturn__)) __attribute__((__format__(printf
 
int __android_log_buf_write (int bufID, int prio, const char *tag, const char *text)
 
int __android_log_buf_print (int bufID, int prio, const char *tag, const char *fmt,...) __attribute__((__format__(printf
 
void __android_log_write_log_message (struct __android_log_message *log_message) __INTRODUCED_IN(30)
 
void __android_log_set_logger (__android_logger_function logger) __INTRODUCED_IN(30)
 
void __android_log_logd_logger (const struct __android_log_message *log_message) __INTRODUCED_IN(30)
 
void __android_log_stderr_logger (const struct __android_log_message *log_message) __INTRODUCED_IN(30)
 
void __android_log_set_aborter (__android_aborter_function aborter) __INTRODUCED_IN(30)
 
void __android_log_call_aborter (const char *abort_message) __INTRODUCED_IN(30)
 
void __android_log_default_aborter (const char *abort_message) __attribute__((noreturn)) __INTRODUCED_IN(30)
 
int __android_log_is_loggable (int prio, const char *tag, int default_prio) __INTRODUCED_IN(30)
 
int __android_log_is_loggable_len (int prio, const char *tag, size_t len, int default_prio) __INTRODUCED_IN(30)
 
int32_t __android_log_set_minimum_priority (int32_t priority) __INTRODUCED_IN(30)
 
int32_t __android_log_get_minimum_priority (void) __INTRODUCED_IN(30)
 
void __android_log_set_default_tag (const char *tag) __INTRODUCED_IN(30)
 

Detailed Description

Support routines to send messages to the Android log buffer, which can later be accessed through the logcat utility.

Each log message must have

The tag normally corresponds to the component that emits the log message, and should be reasonably small.

Log message text may be truncated to less than an implementation-specific limit (1023 bytes).

Note that a newline character ("\n") will be appended automatically to your log message, if not already there. It is not possible to send several messages and have them appear on a single line in logcat.

Please use logging in moderation: