X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/3d9156a7a519a5e3aa1b92e9d9d4b991f1aed7ff..b5d655f7532a546b54809da387f7467d128a756b:/include/asl.h diff --git a/include/asl.h b/include/asl.h index 3eb751d..dadc15a 100644 --- a/include/asl.h +++ b/include/asl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2004 - 2008 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -82,14 +82,23 @@ typedef struct __aslresponse *aslresponse; * Additional attributes may be added as desired, and are * appended in the order that they are defined. */ -#define ASL_KEY_TIME "Time" /* Timestamp (see ctime(3)). Set automatically */ -#define ASL_KEY_HOST "Host" /* Sender's address (set by the server) */ -#define ASL_KEY_SENDER "Sender" /* Sender's identification string. Default is process name */ -#define ASL_KEY_PID "PID" /* Sending process ID encoded as a string. Set automatically */ -#define ASL_KEY_UID "UID" /* UID that sent the log message (set by the server) */ -#define ASL_KEY_GID "GID" /* GID that sent the log message (set by the server) */ -#define ASL_KEY_LEVEL "Level" /* Log level number encoded as a string. See levels above */ -#define ASL_KEY_MSG "Message" /* Actual message that will be logged */ +#define ASL_KEY_TIME "Time" /* Timestamp. Set automatically */ +#define ASL_KEY_TIME_NSEC "TimeNanoSec" /* Nanosecond time. */ +#define ASL_KEY_HOST "Host" /* Sender's address (set by the server). */ +#define ASL_KEY_SENDER "Sender" /* Sender's identification string. Default is process name. */ +#define ASL_KEY_FACILITY "Facility" /* Sender's facility. Default is "user". */ +#define ASL_KEY_PID "PID" /* Sending process ID encoded as a string. Set automatically. */ +#define ASL_KEY_UID "UID" /* UID that sent the log message (set by the server). */ +#define ASL_KEY_GID "GID" /* GID that sent the log message (set by the server). */ +#define ASL_KEY_LEVEL "Level" /* Log level number encoded as a string. See levels above. */ +#define ASL_KEY_MSG "Message" /* Message text. */ +#define ASL_KEY_READ_UID "ReadUID" /* User read access (-1 is any group). */ +#define ASL_KEY_READ_GID "ReadGID" /* Group read access (-1 is any group). */ +#define ASL_KEY_EXPIRE_TIME "ASLExpireTime" /* Expiration time for messages with long TTL. */ +#define ASL_KEY_MSG_ID "ASLMessageID" /* 64-bit message ID number (set by the server). */ +#define ASL_KEY_SESSION "Session" /* Session (set by the launchd). */ +#define ASL_KEY_REF_PID "RefPID" /* Reference PID for messages proxied by launchd */ +#define ASL_KEY_REF_PROC "RefProc" /* Reference process for messages proxied by launchd */ /* * Message Types @@ -163,6 +172,7 @@ int asl_remove_log_file(aslclient asl, int fd); * set in the filter are not sent to the server, although they will be * sent to any file descripters added with asl_add_log_file(). * The default setting is ASL_FILTER_MASK_UPTO(ASL_LEVEL_NOTICE). + * Returns the previous filter value. */ int asl_set_filter(aslclient asl, int f); @@ -213,10 +223,10 @@ const char *asl_get(aslmsg msg, const char *key); * format: A formating string followed by a list of arguments, like printf() * returns 0 for success, non-zero for failure */ -#ifdef __DARWIN_LDBL_COMPAT -int asl_log(aslclient asl, aslmsg msg, int level, const char *format, ...) __DARWIN_LDBL_COMPAT(asl_log); +#ifdef __DARWIN_LDBL_COMPAT2 +int asl_log(aslclient asl, aslmsg msg, int level, const char *format, ...) __DARWIN_LDBL_COMPAT2(asl_log) __printflike(4, 5); #else -int asl_log(aslclient asl, aslmsg msg, int level, const char *format, ...); +int asl_log(aslclient asl, aslmsg msg, int level, const char *format, ...) __printflike(4, 5); #endif /* @@ -229,10 +239,10 @@ int asl_log(aslclient asl, aslmsg msg, int level, const char *format, ...); * format: A formating string followed by a list of arguments, like vprintf() * returns 0 for success, non-zero for failure */ -#ifdef __DARWIN_LDBL_COMPAT -int asl_vlog(aslclient asl, aslmsg msg, int level, const char *format, va_list ap) __DARWIN_LDBL_COMPAT(asl_vlog); +#ifdef __DARWIN_LDBL_COMPAT2 +int asl_vlog(aslclient asl, aslmsg msg, int level, const char *format, va_list ap) __DARWIN_LDBL_COMPAT2(asl_vlog) __printflike(4, 0); #else -int asl_vlog(aslclient asl, aslmsg msg, int level, const char *format, va_list ap); +int asl_vlog(aslclient asl, aslmsg msg, int level, const char *format, va_list ap) __printflike(4, 0); #endif /* @@ -265,7 +275,7 @@ int asl_set_query(aslmsg msg, const char *key, const char *value, uint32_t op); /* * asl_search: Search for messages matching the criteria described * by the aslmsg . The caller should set the attributes to match using - * asl_set_query() or asl_set(). The operatoin ASL_QUERY_OP_EQUAL is + * asl_set_query() or asl_set(). The operation ASL_QUERY_OP_EQUAL is * used for attributes set with asl_set(). * a: an aslmsg * returns: a set of messages that can be iterated over using aslresp_next(), @@ -275,16 +285,16 @@ aslresponse asl_search(aslclient asl, aslmsg msg); /* * aslresponse_next: Iterate over responses returned from asl_search() - * a: a response returned from asl_search(); + * r: a response returned from asl_search(); * returns: The next log message (an aslmsg) or NULL on failure */ aslmsg aslresponse_next(aslresponse r); /* * aslresponse_free: Free a response returned from asl_search() - * a: a response returned from asl_search() + * r: a response returned from asl_search() */ -void aslresponse_free(aslresponse a); +void aslresponse_free(aslresponse r); __END_DECLS