]> git.saurik.com Git - apple/syslog.git/commitdiff
syslog-349.1.1.tar.gz macos-1012 macos-10121 os-x-1012 v349.1.1
authorApple <opensource@apple.com>
Fri, 22 Jul 2016 21:37:32 +0000 (21:37 +0000)
committerApple <opensource@apple.com>
Fri, 22 Jul 2016 21:37:32 +0000 (21:37 +0000)
27 files changed:
aslmanager.tproj/aslmanager.c
libsystem_asl.tproj/include/asl.h
libsystem_asl.tproj/include/asl_client.h
libsystem_asl.tproj/include/asl_core.h
libsystem_asl.tproj/include/asl_file.h
libsystem_asl.tproj/include/asl_legacy1.h
libsystem_asl.tproj/include/asl_msg.h
libsystem_asl.tproj/include/asl_msg_list.h
libsystem_asl.tproj/include/asl_object.h
libsystem_asl.tproj/include/asl_private.h
libsystem_asl.tproj/include/asl_store.h
libsystem_asl.tproj/include/asl_string.h
libsystem_asl.tproj/man/asl.3
libsystem_asl.tproj/src/asl.c
libsystem_asl.tproj/src/asl_client.c
libsystem_asl.tproj/src/asl_fd.c
libsystem_asl.tproj/src/asl_file.c
libsystem_asl.tproj/src/asl_msg.c
libsystem_asl.tproj/src/asl_msg_list.c
libsystem_asl.tproj/src/asl_object.c
libsystem_asl.tproj/src/asl_store.c
libsystem_asl.tproj/src/syslog.c
syslog.xcodeproj/project.pbxproj
syslogd.tproj/daemon.c
syslogd.tproj/dbserver.c
util.tproj/syslog.1
util.tproj/syslog.c

index ace82324328c03e027e6fee76c743d1e1886b44f..f8ab040aaac7851c624b6a2470c5036646ddc6e0 100644 (file)
@@ -139,7 +139,6 @@ cli_main(int argc, char *argv[])
        asl_out_rule_t *r;
        asl_out_dst_data_t store, opts, *asl_store_dst = NULL;
        const char *mname = NULL;
        asl_out_rule_t *r;
        asl_out_dst_data_t store, opts, *asl_store_dst = NULL;
        const char *mname = NULL;
-       char *path = NULL;
        bool quiet = false;
        bool cache_delete = false;
        bool cache_delete_query = false;
        bool quiet = false;
        bool cache_delete = false;
        bool cache_delete_query = false;
@@ -188,6 +187,7 @@ cli_main(int argc, char *argv[])
 
        if (!quiet)
        {
 
        if (!quiet)
        {
+               char *path = NULL;
                int status = asl_make_database_dir(NULL, NULL);
                if (status == 0) status = asl_make_database_dir(ASL_INTERNAL_LOGS_DIR, &path);
                if (status == 0)
                int status = asl_make_database_dir(NULL, NULL);
                if (status == 0) status = asl_make_database_dir(ASL_INTERNAL_LOGS_DIR, &path);
                if (status == 0)
@@ -204,6 +204,7 @@ cli_main(int argc, char *argv[])
                                free(str);
                        }
                }
                                free(str);
                        }
                }
+               free(path);
        }
 
        /* get parameters from asl.conf */
        }
 
        /* get parameters from asl.conf */
@@ -309,7 +310,7 @@ cli_main(int argc, char *argv[])
                }
        }
 
                }
        }
 
-       if (asl_store_dst->path == NULL) asl_store_dst->path = strdup(PATH_ASL_STORE);
+       if (asl_store_dst != NULL && asl_store_dst->path == NULL) asl_store_dst->path = strdup(PATH_ASL_STORE);
 
        debug_log(ASL_LEVEL_ERR, "aslmanager starting%s\n", dryrun ? " dryrun" : "");
 
 
        debug_log(ASL_LEVEL_ERR, "aslmanager starting%s\n", dryrun ? " dryrun" : "");
 
index 218e42e88dcb96c89bfa37f5ec9c3fb1e6683c82..3fb87783ea3b69701aaf551907b6f0f70f4671ef 100644 (file)
@@ -39,6 +39,12 @@ typedef asl_object_t aslmsg;
 typedef asl_object_t aslresponse;
 
 /*! @header
 typedef asl_object_t aslresponse;
 
 /*! @header
+ * These routines are deprecated and replaced by os_log(3).  On OS versions
+ * with os_log(3), the ASL routines for emitting log messages are shimmed into
+ * the equivalent os_log functionality.  Functions whose deprecation messages
+ * indicate they are unsupported will have no effect on OS versions with
+ * os_log(3) support.
+ *
  * These routines provide an interface to the Apple System Log facility.
  * The API allows client applications to create flexible, structured messages
  * and send them to the syslogd server.  Messages received by the server are
  * These routines provide an interface to the Apple System Log facility.
  * The API allows client applications to create flexible, structured messages
  * and send them to the syslogd server.  Messages received by the server are
@@ -333,7 +339,7 @@ uint32_t _asl_evaluate_send(asl_object_t client, asl_object_t msg, int level);
  *    (input) Options (see Client Creation Options).
  * @result Returns an ASL client handle (asl_object_t of type ASL_TYPE_CLIENT).
  */
  *    (input) Options (see Client Creation Options).
  * @result Returns an ASL client handle (asl_object_t of type ASL_TYPE_CLIENT).
  */
-asl_object_t asl_open(const char *ident, const char *facility, uint32_t opts) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+asl_object_t asl_open(const char *ident, const char *facility, uint32_t opts) __API_DEPRECATED("os_log(3) has replaced asl(3); see os_log_create(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Open an ASL database or ASL data file for read or write access.
 
 /*!
  * Open an ASL database or ASL data file for read or write access.
@@ -364,7 +370,7 @@ asl_object_t asl_open(const char *ident, const char *facility, uint32_t opts) __
  *    (input) Options (see File and Store Open Options).
  * @result Returns an ASL object of type ASL_TYPE_STORE or ASL_TYPE_FILE, or NULL on failure.
  */
  *    (input) Options (see File and Store Open Options).
  * @result Returns an ASL object of type ASL_TYPE_STORE or ASL_TYPE_FILE, or NULL on failure.
  */
-asl_object_t asl_open_path(const char *path, uint32_t opts) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_object_t asl_open_path(const char *path, uint32_t opts) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Shuts down a connection to the server.
 
 /*!
  * Shuts down a connection to the server.
@@ -373,7 +379,7 @@ asl_object_t asl_open_path(const char *path, uint32_t opts) __OSX_AVAILABLE_STAR
  * @param obj
  *    (input) An ASL object.
  */
  * @param obj
  *    (input) An ASL object.
  */
-void asl_close(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+void asl_close(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Write log messages to the given file descriptor.
 
 /*!
  * Write log messages to the given file descriptor.
@@ -388,7 +394,7 @@ void asl_close(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2
  *    (input) A file descriptor.
  * @result Returns 0 on success, non-zero on failure.
 */
  *    (input) A file descriptor.
  * @result Returns 0 on success, non-zero on failure.
 */
-int asl_add_log_file(asl_object_t client, int descriptor) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_add_log_file(asl_object_t client, int descriptor) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Write log messages to the given file descriptor.
 
 /*!
  * Write log messages to the given file descriptor.
@@ -413,7 +419,7 @@ int asl_add_log_file(asl_object_t client, int descriptor) __OSX_AVAILABLE_STARTI
  *    (input) A text encoding type.
  * @result Returns 0 on success, non-zero on failure.
  */
  *    (input) A text encoding type.
  * @result Returns 0 on success, non-zero on failure.
  */
-int asl_add_output_file(asl_object_t client, int fd, const char *mfmt, const char *tfmt, int filter, int text_encoding) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_add_output_file(asl_object_t client, int fd, const char *mfmt, const char *tfmt, int filter, int text_encoding) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Write log messages to the given file descriptor.
 
 /*!
  * Write log messages to the given file descriptor.
@@ -429,11 +435,11 @@ int asl_add_output_file(asl_object_t client, int fd, const char *mfmt, const cha
  *    (input) A filter value.
  * @result Returns the previous filter value.
  */
  *    (input) A filter value.
  * @result Returns the previous filter value.
  */
-int asl_set_output_file_filter(asl_object_t client, int fd, int filter) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_set_output_file_filter(asl_object_t client, int fd, int filter) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Stop writing log messages to the given file descriptor.
 
 /*!
  * Stop writing log messages to the given file descriptor.
- * The file descripter is not closed by this routine.
+ * The file descriptor is not closed by this routine.
  *
  * @param client
  *    (input) An ASL client handle (asl_object_t of type ASL_TYPE_CLIENT).
  *
  * @param client
  *    (input) An ASL client handle (asl_object_t of type ASL_TYPE_CLIENT).
@@ -441,7 +447,7 @@ int asl_set_output_file_filter(asl_object_t client, int fd, int filter) __OSX_AV
  *    (input) A file descriptor.
  * @result Returns 0 on success, non-zero on failure.
  */
  *    (input) A file descriptor.
  * @result Returns 0 on success, non-zero on failure.
  */
-int asl_remove_log_file(asl_object_t client, int descriptor) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_remove_log_file(asl_object_t client, int descriptor) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Set a filter for messages being sent to the server.
 
 /*!
  * Set a filter for messages being sent to the server.
@@ -461,7 +467,7 @@ int asl_remove_log_file(asl_object_t client, int descriptor) __OSX_AVAILABLE_STA
  *    (input) A filter value.
  * @result Returns the previous filter value.
  */
  *    (input) A filter value.
  * @result Returns the previous filter value.
  */
-int asl_set_filter(asl_object_t client, int f) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_set_filter(asl_object_t client, int f) __API_DEPRECATED("os_log(3) has replaced asl(3); see log(1)'s config command", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*
  * Examine attribute keys.
 
 /*
  * Examine attribute keys.
@@ -473,7 +479,7 @@ int asl_set_filter(asl_object_t client, int f) __OSX_AVAILABLE_STARTING(__MAC_10
  * @result Returns the key of the nth attribute in a message (beginning at zero),
  * or NULL if n is greater than the largest message index.
  */
  * @result Returns the key of the nth attribute in a message (beginning at zero),
  * or NULL if n is greater than the largest message index.
  */
-const char *asl_key(asl_object_t msg, uint32_t n) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+const char *asl_key(asl_object_t msg, uint32_t n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*
  * Examine attribute keys.
 
 /*
  * Examine attribute keys.
@@ -490,7 +496,7 @@ const char *asl_key(asl_object_t msg, uint32_t n) __OSX_AVAILABLE_STARTING(__MAC
  *    (input) An index value.
  * @result returns 0 for success, non-zero for failure.
  */
  *    (input) An index value.
  * @result returns 0 for success, non-zero for failure.
  */
-int asl_fetch_key_val_op(asl_object_t msg, uint32_t n, const char **key, const char **val, uint32_t *op) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_fetch_key_val_op(asl_object_t msg, uint32_t n, const char **key, const char **val, uint32_t *op) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Create a new log message, query message, message list, or a connection to the system database.
 
 /*!
  * Create a new log message, query message, message list, or a connection to the system database.
@@ -505,7 +511,7 @@ int asl_fetch_key_val_op(asl_object_t msg, uint32_t n, const char **key, const c
  *    The Sender and Facility values associated with an ASL_TYPE_CLIENT may
  *    be reset using asl_set().
  */
  *    The Sender and Facility values associated with an ASL_TYPE_CLIENT may
  *    be reset using asl_set().
  */
-asl_object_t asl_new(uint32_t type) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+asl_object_t asl_new(uint32_t type) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Set or re-set a message or query attribute.
 
 /*!
  * Set or re-set a message or query attribute.
@@ -520,7 +526,7 @@ asl_object_t asl_new(uint32_t type) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHON
  *    (input) Attribute value.
  * @result returns 0 for success, non-zero for failure.
  */
  *    (input) Attribute value.
  * @result returns 0 for success, non-zero for failure.
  */
-int asl_set(asl_object_t obj, const char *key, const char *value) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_set(asl_object_t obj, const char *key, const char *value) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Remove a key/value attribute.
 
 /*!
  * Remove a key/value attribute.
@@ -531,7 +537,7 @@ int asl_set(asl_object_t obj, const char *key, const char *value) __OSX_AVAILABL
  *    (input) Attribute key.
  * returns 0 for success, non-zero for failure.
  */
  *    (input) Attribute key.
  * returns 0 for success, non-zero for failure.
  */
-int asl_unset(asl_object_t obj, const char *key) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_unset(asl_object_t obj, const char *key) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Get the value associated with an attribute key.
 
 /*!
  * Get the value associated with an attribute key.
@@ -542,7 +548,7 @@ int asl_unset(asl_object_t obj, const char *key) __OSX_AVAILABLE_STARTING(__MAC_
  *    (input) Attribute key.
  * @result Returns the attribute value, or NULL if the object does not contain the key.
  */
  *    (input) Attribute key.
  * @result Returns the attribute value, or NULL if the object does not contain the key.
  */
-const char *asl_get(asl_object_t msg, const char *key) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+const char *asl_get(asl_object_t msg, const char *key) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Log a message with a particular log level.
 
 /*!
  * Log a message with a particular log level.
@@ -577,7 +583,7 @@ const char *asl_get(asl_object_t msg, const char *key) __OSX_AVAILABLE_STARTING(
  *    The object type ASL_TYPE_QUERY is supported, but the key/value pairs set in the
  *    object will have an operator value of zero.
  */
  *    The object type ASL_TYPE_QUERY is supported, but the key/value pairs set in the
  *    object will have an operator value of zero.
  */
-int asl_log(asl_object_t client, asl_object_t msg, int level, const char *format, ...) __printflike(4, 5) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_log(asl_object_t client, asl_object_t msg, int level, const char *format, ...) __printflike(4, 5) __not_tail_called __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Log a message with a particular log level.
 
 /*!
  * Log a message with a particular log level.
@@ -592,7 +598,7 @@ int asl_log(asl_object_t client, asl_object_t msg, int level, const char *format
  *    (input) A printf() - style format string followed by a list of arguments.
  * @result Returns 0 for success, non-zero for failure.
  */
  *    (input) A printf() - style format string followed by a list of arguments.
  * @result Returns 0 for success, non-zero for failure.
  */
-int asl_log_message(int level, const char *format, ...) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_log_message(int level, const char *format, ...) __printflike(2, 3) __not_tail_called __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Log a message with a particular log level.
 
 /*!
  * Log a message with a particular log level.
@@ -614,7 +620,7 @@ int asl_log_message(int level, const char *format, ...) __printflike(2, 3) __OSX
  *    types of input object.
  *
  */
  *    types of input object.
  *
  */
-int asl_vlog(asl_object_t obj, asl_object_t msg, int level, const char *format, va_list ap) __printflike(4, 0) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_vlog(asl_object_t obj, asl_object_t msg, int level, const char *format, va_list ap) __printflike(4, 0) __not_tail_called __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Log a message.
 
 /*!
  * Log a message.
@@ -631,7 +637,7 @@ int asl_vlog(asl_object_t obj, asl_object_t msg, int level, const char *format,
  *    See the discussion for asl_log() for a description of how this routine treats different
  *    types of input object.
  */
  *    See the discussion for asl_log() for a description of how this routine treats different
  *    types of input object.
  */
-int asl_send(asl_object_t obj, asl_object_t msg) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_send(asl_object_t obj, asl_object_t msg) __not_tail_called __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * DEPRECATED: Free an ASL object and all internal resources associated with it.
 
 /*!
  * DEPRECATED: Free an ASL object and all internal resources associated with it.
@@ -641,7 +647,7 @@ int asl_send(asl_object_t obj, asl_object_t msg) __OSX_AVAILABLE_STARTING(__MAC_
  * @param obj
  *    (input) An ASL object to free.
  */
  * @param obj
  *    (input) An ASL object to free.
  */
-void asl_free(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+void asl_free(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Increment the internal reference count of an ASL object.
 
 /*!
  * Increment the internal reference count of an ASL object.
@@ -650,7 +656,7 @@ void asl_free(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_
  *    (input) An ASL object to retain.
  * @result Returns the object.
  */
  *    (input) An ASL object to retain.
  * @result Returns the object.
  */
-asl_object_t asl_retain(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_object_t asl_retain(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Decrement the internal reference count of an ASL object.
 
 /*!
  * Decrement the internal reference count of an ASL object.
@@ -659,7 +665,7 @@ asl_object_t asl_retain(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10,
  * @param obj
  *    (input) An ASL object to release.
  */
  * @param obj
  *    (input) An ASL object to release.
  */
-void asl_release(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+void asl_release(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Get the internal type of an ASL object.
 
 /*!
  * Get the internal type of an ASL object.
@@ -668,7 +674,7 @@ void asl_release(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHON
  *    (input) An ASL object.
  * @result Returns the object type.
  */
  *    (input) An ASL object.
  * @result Returns the object type.
  */
-uint32_t asl_get_type(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+uint32_t asl_get_type(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Set arbitrary parameters of a query.
 
 /*!
  * Set arbitrary parameters of a query.
@@ -685,7 +691,7 @@ uint32_t asl_get_type(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __
  *    (input) An operation (ASL_QUERY_OP_*)
  * @result Returns 0 for success, non-zero for failure
  */
  *    (input) An operation (ASL_QUERY_OP_*)
  * @result Returns 0 for success, non-zero for failure
  */
-int asl_set_query(asl_object_t msg, const char *key, const char *value, uint32_t op) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+int asl_set_query(asl_object_t msg, const char *key, const char *value, uint32_t op) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Search for messages matching the criteria described by an query object.
 
 /*!
  * Search for messages matching the criteria described by an query object.
@@ -717,7 +723,7 @@ int asl_set_query(asl_object_t msg, const char *key, const char *value, uint32_t
  *    If obj is of type ASL_TYPE_QUERY and query is of type ASL_TYPE_MSG, the routine returns NULL.
  *
  */
  *    If obj is of type ASL_TYPE_QUERY and query is of type ASL_TYPE_MSG, the routine returns NULL.
  *
  */
-asl_object_t asl_search(asl_object_t obj, asl_object_t query) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
+asl_object_t asl_search(asl_object_t obj, asl_object_t query) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * DEPRECATED: Iterate over messages in an asl_object_t (same as an aslresponse).
 
 /*!
  * DEPRECATED: Iterate over messages in an asl_object_t (same as an aslresponse).
@@ -757,7 +763,7 @@ void aslresponse_free(asl_object_t obj) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC
  * @param obj_to_add
  *    (input) An object of type ASL_TYPE_MSG, ASL_TYPE_QUERY or type ASL_TYPE_LIST.
  */
  * @param obj_to_add
  *    (input) An object of type ASL_TYPE_MSG, ASL_TYPE_QUERY or type ASL_TYPE_LIST.
  */
-void asl_append(asl_object_t obj, asl_object_t obj_to_add) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+void asl_append(asl_object_t obj, asl_object_t obj_to_add) __not_tail_called __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Prepend messages to an object of type ASL_TYPE_LIST.  The input "obj"
 
 /*!
  * Prepend messages to an object of type ASL_TYPE_LIST.  The input "obj"
@@ -771,7 +777,7 @@ void asl_append(asl_object_t obj, asl_object_t obj_to_add) __OSX_AVAILABLE_START
  * @param obj_to_add
  *    (input) An object of type ASL_TYPE_MSG, ASL_TYPE_QUERY or type ASL_TYPE_LIST.
  */
  * @param obj_to_add
  *    (input) An object of type ASL_TYPE_MSG, ASL_TYPE_QUERY or type ASL_TYPE_LIST.
  */
-void asl_prepend(asl_object_t obj, asl_object_t obj_to_add) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+void asl_prepend(asl_object_t obj, asl_object_t obj_to_add) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Get the number of key/value pairs in an object of type ASL_TYPE_MSG or ASL_TYPE_QUERY,
 
 /*!
  * Get the number of key/value pairs in an object of type ASL_TYPE_MSG or ASL_TYPE_QUERY,
@@ -783,7 +789,7 @@ void asl_prepend(asl_object_t obj, asl_object_t obj_to_add) __OSX_AVAILABLE_STAR
  *    Returns zero if object is empty or NULL, or if the type is not
  *    ASL_TYPE_MSG, ASL_TYPE_QUERY, or ASL_TYPE_LIST.
  */
  *    Returns zero if object is empty or NULL, or if the type is not
  *    ASL_TYPE_MSG, ASL_TYPE_QUERY, or ASL_TYPE_LIST.
  */
-size_t asl_count(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+size_t asl_count(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Retreive a message from an object of type ASL_TYPE_LIST.
 
 /*!
  * Retreive a message from an object of type ASL_TYPE_LIST.
@@ -793,7 +799,7 @@ size_t asl_count(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHON
  * @result Returns the message (an object of type ASL_TYPE_MSG or ASL_TYPE_QUERY) at the specified index.
  *    Returns NULL if the index is out of range or if list is not an object of type ASL_TYPE_LIST.
  */
  * @result Returns the message (an object of type ASL_TYPE_MSG or ASL_TYPE_QUERY) at the specified index.
  *    Returns NULL if the index is out of range or if list is not an object of type ASL_TYPE_LIST.
  */
-asl_object_t asl_get_index(asl_object_t list, size_t index) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_object_t asl_get_index(asl_object_t list, size_t index) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Remove the message at a specified index from an object of type ASL_TYPE_LIST.
 
 /*!
  * Remove the message at a specified index from an object of type ASL_TYPE_LIST.
@@ -801,7 +807,7 @@ asl_object_t asl_get_index(asl_object_t list, size_t index) __OSX_AVAILABLE_STAR
  * @param list
  *    (input) An object of type ASL_TYPE_LIST.
  */
  * @param list
  *    (input) An object of type ASL_TYPE_LIST.
  */
-void asl_remove_index(asl_object_t list, size_t index) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+void asl_remove_index(asl_object_t list, size_t index) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Creates an auxiliary file that may be used to save arbitrary data.  The ASL message msg
 
 /*!
  * Creates an auxiliary file that may be used to save arbitrary data.  The ASL message msg
@@ -830,7 +836,7 @@ void asl_remove_index(asl_object_t list, size_t index) __OSX_AVAILABLE_STARTING(
  *    (output) A writable file descriptor.
  * @result Returns 0 for success, non-zero for failure
  */
  *    (output) A writable file descriptor.
  * @result Returns 0 for success, non-zero for failure
  */
-int asl_create_auxiliary_file(asl_object_t msg, const char *title, const char *uti, int *out_descriptor) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0);
+int asl_create_auxiliary_file(asl_object_t msg, const char *title, const char *uti, int *out_descriptor) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.7,10.12), ios(5.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Close an auxiliary file opened by asl_create_auxiliary_file() when writing is complete.
 
 /*!
  * Close an auxiliary file opened by asl_create_auxiliary_file() when writing is complete.
@@ -841,7 +847,7 @@ int asl_create_auxiliary_file(asl_object_t msg, const char *title, const char *u
  *    (input) The file descriptor
  * @result Returns 0 for success, non-zero for failure
  */
  *    (input) The file descriptor
  * @result Returns 0 for success, non-zero for failure
  */
-int asl_close_auxiliary_file(int descriptor) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0);
+int asl_close_auxiliary_file(int descriptor) __API_DEPRECATED("os_log(3) has replaced asl(3); this functionality is no longer supported", macosx(10.7,10.12), ios(5.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Sends an ASL message to syslogd along with a title string, Uniform Resource Locator, 
 
 /*!
  * Sends an ASL message to syslogd along with a title string, Uniform Resource Locator, 
@@ -859,7 +865,7 @@ int asl_close_auxiliary_file(int descriptor) __OSX_AVAILABLE_STARTING(__MAC_10_7
  *    (input) Uniform Type Locator
  * @result Returns 0 for success, non-zero for failure
  */
  *    (input) Uniform Type Locator
  * @result Returns 0 for success, non-zero for failure
  */
-int asl_log_auxiliary_location(asl_object_t msg, const char *title, const char *uti, const char *url) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0);
+int asl_log_auxiliary_location(asl_object_t msg, const char *title, const char *uti, const char *url) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(5.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Creates an object of type ASL_TYPE_CLIENT for logging to a file descriptor.
 
 /*!
  * Creates an object of type ASL_TYPE_CLIENT for logging to a file descriptor.
@@ -891,7 +897,7 @@ int asl_log_auxiliary_location(asl_object_t msg, const char *title, const char *
  *    (input) Facility name
  * @result An object of type ASL_TYPE_CLIENT.
  */
  *    (input) Facility name
  * @result An object of type ASL_TYPE_CLIENT.
  */
-asl_object_t asl_open_from_file(int descriptor, const char *ident, const char *facility) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0);
+asl_object_t asl_open_from_file(int descriptor, const char *ident, const char *facility) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(5.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * This API provides functionality to use file descriptors to send logging
 
 /*!
  * This API provides functionality to use file descriptors to send logging
@@ -935,7 +941,7 @@ asl_object_t asl_open_from_file(int descriptor, const char *ident, const char *f
  *    (input) Either ASL_LOG_DESCRIPTOR_READ or ASL_LOG_DESCRIPTOR_WRITE
  * @result Returns 0 for success, non-zero for failure
  */
  *    (input) Either ASL_LOG_DESCRIPTOR_READ or ASL_LOG_DESCRIPTOR_WRITE
  * @result Returns 0 for success, non-zero for failure
  */
-int asl_log_descriptor(asl_object_t asl, asl_object_t msg, int level, int descriptor, uint32_t fd_type) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_1);
+int asl_log_descriptor(asl_object_t asl, asl_object_t msg, int level, int descriptor, uint32_t fd_type) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 #pragma mark -
 
 
 #pragma mark -
 
@@ -962,7 +968,7 @@ int asl_log_descriptor(asl_object_t asl, asl_object_t msg, int level, int descri
  *    (input) Text encoding control (for special characters).  See "Text Encoding Types".
 * @result Returns a character string, or NULL in case of a failure.
  */
  *    (input) Text encoding control (for special characters).  See "Text Encoding Types".
 * @result Returns a character string, or NULL in case of a failure.
  */
-char *asl_format(asl_object_t msg, const char *msg_fmt, const char *time_fmt, uint32_t text_encoding) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+char *asl_format(asl_object_t msg, const char *msg_fmt, const char *time_fmt, uint32_t text_encoding) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Encodes a buffer with embedded nul characters into a nul terminated C string.
 
 /*!
  * Encodes a buffer with embedded nul characters into a nul terminated C string.
@@ -979,7 +985,7 @@ char *asl_format(asl_object_t msg, const char *msg_fmt, const char *time_fmt, ui
  *    (input) Length (in octets) of data buffer.
  * @result Returns an encoded character string.
  */
  *    (input) Length (in octets) of data buffer.
  * @result Returns an encoded character string.
  */
-char *asl_encode_buffer(const char *buf, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+char *asl_encode_buffer(const char *buf, size_t len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Decodes a C string previously created by asl_encode_buffer back into a buffer,
 
 /*!
  * Decodes a C string previously created by asl_encode_buffer back into a buffer,
@@ -998,7 +1004,7 @@ char *asl_encode_buffer(const char *buf, size_t len) __OSX_AVAILABLE_STARTING(__
  *    (input) Length (in octets) of data buffer.
  * @result Returns 0 on success, non-zero on failure.
  */
  *    (input) Length (in octets) of data buffer.
  * @result Returns 0 on success, non-zero on failure.
  */
-int asl_decode_buffer(const char *in, char **buf, size_t *len) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_decode_buffer(const char *in, char **buf, size_t *len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Iterate forward through messages in an asl_object_t.
 
 /*!
  * Iterate forward through messages in an asl_object_t.
@@ -1013,7 +1019,7 @@ int asl_decode_buffer(const char *in, char **buf, size_t *len) __OSX_AVAILABLE_S
  *    which should be of type ASL_TYPE_CLIENT, ASL_TYPE_LIST, ASL_TYPE_STORE, or ASL_TYPE_FILE.
  *    Returns NULL when there are no more messages or if obj is not a type that holds messages.
  */
  *    which should be of type ASL_TYPE_CLIENT, ASL_TYPE_LIST, ASL_TYPE_STORE, or ASL_TYPE_FILE.
  *    Returns NULL when there are no more messages or if obj is not a type that holds messages.
  */
-asl_object_t asl_next(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_object_t asl_next(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Iterate backwards through messages in an asl_object_t.
 
 /*!
  * Iterate backwards through messages in an asl_object_t.
@@ -1028,7 +1034,7 @@ asl_object_t asl_next(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __
  *    which should be of type ASL_TYPE_CLIENT, ASL_TYPE_LIST, ASL_TYPE_STORE, or ASL_TYPE_FILE.
  *    Returns NULL when there are no more messages or if obj is not a type that holds messages.
  */
  *    which should be of type ASL_TYPE_CLIENT, ASL_TYPE_LIST, ASL_TYPE_STORE, or ASL_TYPE_FILE.
  *    Returns NULL when there are no more messages or if obj is not a type that holds messages.
  */
-asl_object_t asl_prev(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_object_t asl_prev(asl_object_t obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Reset internal interation index in an asl_object_t.
 
 /*!
  * Reset internal interation index in an asl_object_t.
@@ -1039,7 +1045,7 @@ asl_object_t asl_prev(asl_object_t obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __
  *    (input) Use 0 to position the internal interation index at the beginning of the asl_object_t object,
  *    and SIZE_MAX to position it at the end.  Other values of position may cause unpredictable behavior.
  */
  *    (input) Use 0 to position the internal interation index at the beginning of the asl_object_t object,
  *    and SIZE_MAX to position it at the end.  Other values of position may cause unpredictable behavior.
  */
-void asl_reset_iteration(asl_object_t obj, size_t position) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+void asl_reset_iteration(asl_object_t obj, size_t position) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /*!
  * Searches an asl_object_t.
 
 /*!
  * Searches an asl_object_t.
@@ -1077,7 +1083,7 @@ void asl_reset_iteration(asl_object_t obj, size_t position) __OSX_AVAILABLE_STAR
  *    (input) ASL_MATCH_DIRECTION_FORWARD or ASL_MATCH_DIRECTION_REVERSE.
  * @result Returns an ASL object containing messages matching the querylist, or NULL if there are no matches.
  */
  *    (input) ASL_MATCH_DIRECTION_FORWARD or ASL_MATCH_DIRECTION_REVERSE.
  * @result Returns an ASL object containing messages matching the querylist, or NULL if there are no matches.
  */
-asl_object_t asl_match(asl_object_t data, asl_object_t querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_object_t asl_match(asl_object_t data, asl_object_t querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 __END_DECLS
 
 
 __END_DECLS
 
index 060fe4e122d7d4cdd451dc13fe2596a5f593d229..c27abdb0f7375be4d20f15da89805bb8163657af 100644 (file)
@@ -75,29 +75,29 @@ __BEGIN_DECLS
 
 const asl_jump_table_t *asl_client_jump_table(void);
 
 
 const asl_jump_table_t *asl_client_jump_table(void);
 
-asl_client_t *asl_client_open(const char *ident, const char *facility, uint32_t opts) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_client_t *asl_client_open_from_file(int descriptor, const char *ident, const char *facility) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_client_t *asl_client_retain(asl_client_t *client) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_client_release(asl_client_t *client) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_client_t *asl_client_open(const char *ident, const char *facility, uint32_t opts) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_client_t *asl_client_open_from_file(int descriptor, const char *ident, const char *facility) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_client_t *asl_client_retain(asl_client_t *client) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_client_release(asl_client_t *client) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_client_set_filter(asl_client_t *client, int filter) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-ASL_STATUS asl_client_add_output_file(asl_client_t *client, int descriptor, const char *mfmt, const char *tfmt, int filter, int text_encoding) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-int asl_client_set_output_file_filter(asl_client_t *client, int fd, int filter) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-ASL_STATUS asl_client_remove_output_file(asl_client_t *client, int descriptor) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_client_set_filter(asl_client_t *client, int filter) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+ASL_STATUS asl_client_add_output_file(asl_client_t *client, int descriptor, const char *mfmt, const char *tfmt, int filter, int text_encoding) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int asl_client_set_output_file_filter(asl_client_t *client, int fd, int filter) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+ASL_STATUS asl_client_remove_output_file(asl_client_t *client, int descriptor) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_client_log_descriptor(asl_client_t *client, asl_msg_t *msg, int level, int descriptor, uint32_t fd_type) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_client_log_descriptor(asl_client_t *client, asl_msg_t *msg, int level, int descriptor, uint32_t fd_type) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_t *asl_client_kvdict(asl_client_t *client) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_msg_t *asl_client_kvdict(asl_client_t *client) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_client_log(asl_client_t *client, asl_msg_t *msg, int level, const char *format, ...) __printflike(4, 5) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-int asl_client_vlog(asl_client_t *client, asl_msg_t *msg, int level, const char *format, va_list ap) __printflike(4, 0) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-ASL_STATUS asl_client_send(asl_client_t *client, asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_client_log(asl_client_t *client, asl_msg_t *msg, int level, const char *format, ...) __printflike(4, 5) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int asl_client_vlog(asl_client_t *client, asl_msg_t *msg, int level, const char *format, va_list ap) __printflike(4, 0) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+ASL_STATUS asl_client_send(asl_client_t *client, asl_msg_t *msg) __not_tail_called __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_list_t *asl_client_search(asl_client_t *client, asl_msg_t *query) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_list_t *asl_client_match(asl_client_t *client, asl_msg_list_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_msg_list_t *asl_client_search(asl_client_t *client, asl_msg_t *query) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_list_t *asl_client_match(asl_client_t *client, asl_msg_list_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_client_set_control(asl_client_t *client, uint32_t filter) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
-uint32_t asl_client_get_control(asl_client_t *client) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
+uint32_t asl_client_set_control(asl_client_t *client, uint32_t filter) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_client_get_control(asl_client_t *client) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 __END_DECLS
 
 
 __END_DECLS
 
index f9338721dafee3da80de7bd44c0a5f020fe13ffc..ba2bef68c404b2678ce09a81070f2edddb2db547 100644 (file)
@@ -105,23 +105,23 @@ typedef uint32_t ASL_STATUS;
 #define ASL_PLACE_ARCHIVE_DEFAULT "/var/log/asl.archive"
 #endif
 
 #define ASL_PLACE_ARCHIVE_DEFAULT "/var/log/asl.archive"
 #endif
 
-mach_port_t asl_core_get_service_port(int reset) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-
-uint32_t asl_core_string_hash(const char *str, uint32_t len) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-const char *asl_core_error(uint32_t code) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-const char *asl_core_level_to_string(uint32_t level) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-uint32_t asl_core_check_access(int32_t msgu, int32_t msgg, int32_t readu, int32_t readg, uint16_t flags) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint64_t asl_core_htonq(uint64_t n) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint64_t asl_core_ntohq(uint64_t n)__OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint64_t asl_core_new_msg_id(uint64_t start) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-char *asl_core_encode_buffer(const char *in, uint32_t len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
-int32_t asl_core_decode_buffer(const char *in, char **buf, uint32_t *len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
-
-time_t asl_core_parse_time(const char *in, uint32_t *tlen) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-size_t asl_core_str_to_size(char *s) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0); //TODO: 10_11 & 7_1 or 8_0
-time_t asl_core_str_to_time(char *s, uint32_t def_n) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0); //TODO: 10_11 & 7_1 or 8_0
-void asl_core_time_to_str(time_t s, char *str, size_t len) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0); //TODO: 10_11 & 7_1 or 8_0
-
-const char *asl_filesystem_path(uint32_t place) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+mach_port_t asl_core_get_service_port(int reset) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+
+uint32_t asl_core_string_hash(const char *str, uint32_t len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+const char *asl_core_error(uint32_t code) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+const char *asl_core_level_to_string(uint32_t level) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_core_check_access(int32_t msgu, int32_t msgg, int32_t readu, int32_t readg, uint16_t flags) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint64_t asl_core_htonq(uint64_t n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint64_t asl_core_ntohq(uint64_t n)__API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint64_t asl_core_new_msg_id(uint64_t start) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+char *asl_core_encode_buffer(const char *in, uint32_t len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(5.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int32_t asl_core_decode_buffer(const char *in, char **buf, uint32_t *len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(5.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+
+time_t asl_core_parse_time(const char *in, uint32_t *tlen) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+size_t asl_core_str_to_size(char *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+time_t asl_core_str_to_time(char *s, uint32_t def_n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_core_time_to_str(time_t s, char *str, size_t len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+
+const char *asl_filesystem_path(uint32_t place) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 #endif /* __ASL_CORE_H__ */
 
 #endif /* __ASL_CORE_H__ */
index 07a2a2b377bd2f45e252e2e1e2d57fe4cc134277..cd4d18ecea80f558de5f91b4247698286dec353e 100644 (file)
@@ -140,37 +140,37 @@ __BEGIN_DECLS
 
 const asl_jump_table_t *asl_file_jump_table(void);
 
 
 const asl_jump_table_t *asl_file_jump_table(void);
 
-asl_file_list_t *asl_file_list_add(asl_file_list_t *list, asl_file_t *f) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-void asl_file_list_close(asl_file_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+asl_file_list_t *asl_file_list_add(asl_file_list_t *list, asl_file_t *f) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_file_list_close(asl_file_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_file_t *asl_file_retain(asl_file_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_file_release(asl_file_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_file_t *asl_file_retain(asl_file_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_file_release(asl_file_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_file_open_write(const char *path, mode_t mode, uid_t uid, gid_t gid, asl_file_t **s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_file_close(asl_file_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_file_open_write(const char *path, mode_t mode, uid_t uid, gid_t gid, asl_file_t **s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_close(asl_file_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_file_save(asl_file_t *s, asl_msg_t *msg, uint64_t *mid) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_file_save(asl_file_t *s, asl_msg_t *msg, uint64_t *mid) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_file_open_read(const char *path, asl_file_t **s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_file_fetch(asl_file_t *s, uint64_t mid, asl_msg_t **msg) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_file_open_read(const char *path, asl_file_t **s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_fetch(asl_file_t *s, uint64_t mid, asl_msg_t **msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_file_read_set_position(asl_file_t *s, uint32_t pos) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_file_fetch_next(asl_file_t *s, asl_msg_t **msg) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_file_fetch_previous(asl_file_t *s, asl_msg_t **msg) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_file_read_set_position(asl_file_t *s, uint32_t pos) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_fetch_next(asl_file_t *s, asl_msg_t **msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_fetch_previous(asl_file_t *s, asl_msg_t **msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_list_t *asl_file_match(asl_file_t *s, asl_msg_list_t *query, uint64_t *last, uint64_t start, uint32_t count, uint32_t duration, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-asl_msg_list_t *asl_file_list_match(asl_file_list_t *list, asl_msg_list_t *query, uint64_t *last, uint64_t start, uint32_t count, uint32_t duration, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+asl_msg_list_t *asl_file_match(asl_file_t *s, asl_msg_list_t *query, uint64_t *last, uint64_t start, uint32_t count, uint32_t duration, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_list_t *asl_file_list_match(asl_file_list_t *list, asl_msg_list_t *query, uint64_t *last, uint64_t start, uint32_t count, uint32_t duration, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-void *asl_file_list_match_start(asl_file_list_t *list, uint64_t start_id, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_file_list_match_next(void *token, asl_msg_list_t *query, asl_msg_list_t **res, uint32_t count) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-void asl_file_list_match_end(void *token) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+void *asl_file_list_match_start(asl_file_list_t *list, uint64_t start_id, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_list_match_next(void *token, asl_msg_list_t *query, asl_msg_list_t **res, uint32_t count) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_file_list_match_end(void *token) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-size_t asl_file_size(asl_file_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint64_t asl_file_ctime(asl_file_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+size_t asl_file_size(asl_file_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint64_t asl_file_ctime(asl_file_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_file_compact(asl_file_t *s, const char *path, mode_t mode, uid_t uid, gid_t gid) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_file_filter(asl_file_t *s, const char *path, asl_msg_list_t *filter, uint32_t flags, mode_t mode, uid_t uid, gid_t gid, uint32_t *dstcount, void (*aux_callback)(const char *auxfile)) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-uint32_t asl_file_filter_level(asl_file_t *s, const char *path, uint32_t keep_mask, mode_t mode, uid_t uid, gid_t gid, uint32_t *dstcount, void (*aux_callback)(const char *auxfile)) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+uint32_t asl_file_compact(asl_file_t *s, const char *path, mode_t mode, uid_t uid, gid_t gid) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_filter(asl_file_t *s, const char *path, asl_msg_list_t *filter, uint32_t flags, mode_t mode, uid_t uid, gid_t gid, uint32_t *dstcount, void (*aux_callback)(const char *auxfile)) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_file_filter_level(asl_file_t *s, const char *path, uint32_t keep_mask, mode_t mode, uid_t uid, gid_t gid, uint32_t *dstcount, void (*aux_callback)(const char *auxfile)) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 __END_DECLS
 
 
 __END_DECLS
 
index 7d6839f785bc0820fc304aeaa036031e59d87ce6..07b6b5515b3c4b17ad2a880028fd48ac9b6d3fc7 100644 (file)
@@ -79,9 +79,9 @@ typedef struct
        FILE *db;
 } asl_legacy1_t;
 
        FILE *db;
 } asl_legacy1_t;
 
-uint32_t asl_legacy1_open(const char *path, asl_legacy1_t **s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_legacy1_close(asl_legacy1_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_legacy1_fetch(asl_legacy1_t *s, uint64_t msgid, asl_msg_t **msg) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_legacy1_match(asl_legacy1_t *s, asl_msg_list_t *query, asl_msg_list_t **res, uint64_t *last, uint64_t start, uint32_t count, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_legacy1_open(const char *path, asl_legacy1_t **s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_legacy1_close(asl_legacy1_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_legacy1_fetch(asl_legacy1_t *s, uint64_t msgid, asl_msg_t **msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_legacy1_match(asl_legacy1_t *s, asl_msg_list_t *query, asl_msg_list_t **res, uint64_t *last, uint64_t start, uint32_t count, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 #endif /*__ASL_LEGACY1_H__*/
 
 #endif /*__ASL_LEGACY1_H__*/
index a346ec63af21972608a61a71ae16dbe5dd74f13d..b66862fb2458a175e3f3b583d149f6eb02de46e4 100644 (file)
@@ -109,34 +109,34 @@ __BEGIN_DECLS
 const asl_jump_table_t *asl_msg_jump_table(void);
 
 /* new/retain/release */
 const asl_jump_table_t *asl_msg_jump_table(void);
 
 /* new/retain/release */
-asl_msg_t *asl_msg_new(uint32_t type) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-asl_msg_t *asl_msg_retain(asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-void asl_msg_release(asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+asl_msg_t *asl_msg_new(uint32_t type) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_t *asl_msg_retain(asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_release(asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_msg_set_key_val(asl_msg_t *msg, const char *key, const char *val) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-int asl_msg_set_key_val_op(asl_msg_t *msg, const char *key, const char *val, uint32_t op) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-void asl_msg_unset(asl_msg_t *msg, const char *key) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-void asl_msg_unset_index(asl_msg_t *msg, uint32_t n) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_msg_set_key_val(asl_msg_t *msg, const char *key, const char *val) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int asl_msg_set_key_val_op(asl_msg_t *msg, const char *key, const char *val, uint32_t op) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_unset(asl_msg_t *msg, const char *key) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_unset_index(asl_msg_t *msg, uint32_t n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_t *asl_msg_copy(asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_msg_t *asl_msg_merge(asl_msg_t *target, asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
+asl_msg_t *asl_msg_copy(asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_t *asl_msg_merge(asl_msg_t *target, asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_msg_lookup(asl_msg_t *msg, const char *key, const char **valout, uint16_t *opout) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-uint32_t asl_msg_fetch(asl_msg_t *msg, uint32_t n, const char **keyout, const char **valout, uint16_t *opout) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-const char *asl_msg_get_val_for_key(asl_msg_t *msg, const char *key) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_msg_lookup(asl_msg_t *msg, const char *key, const char **valout, uint16_t *opout) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_msg_fetch(asl_msg_t *msg, uint32_t n, const char **keyout, const char **valout, uint16_t *opout) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+const char *asl_msg_get_val_for_key(asl_msg_t *msg, const char *key) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_msg_type(asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-uint32_t asl_msg_count(asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+uint32_t asl_msg_type(asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_msg_count(asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-char *asl_msg_to_string(asl_msg_t *in, uint32_t *len) __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
-asl_msg_t *asl_msg_from_string(const char *buf) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_7_0);
+char *asl_msg_to_string(asl_msg_t *in, uint32_t *len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_t *asl_msg_from_string(const char *buf) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-char *asl_format_message(asl_msg_t *msg, const char *msg_fmt, const char *time_fmt, uint32_t text_encoding, uint32_t *outlen) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+char *asl_format_message(asl_msg_t *msg, const char *msg_fmt, const char *time_fmt, uint32_t text_encoding, uint32_t *outlen) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_string_t *asl_msg_to_string_raw(uint32_t encoding, asl_msg_t *msg, const char *tfmt) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t * asl_string_append_asl_msg(asl_string_t *str, asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_string_t *asl_msg_to_string_raw(uint32_t encoding, asl_msg_t *msg, const char *tfmt) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t * asl_string_append_asl_msg(asl_string_t *str, asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_msg_cmp(asl_msg_t *a, asl_msg_t *b) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_msg_cmp(asl_msg_t *a, asl_msg_t *b) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 void _asl_log_args_to_xpc(asl_object_t client, asl_object_t msg, xpc_object_t dict); //TODO: ADD AVAILABLITY INFO
 
 
 void _asl_log_args_to_xpc(asl_object_t client, asl_object_t msg, xpc_object_t dict); //TODO: ADD AVAILABLITY INFO
 
index f0a7f076c35a09fe41af2e283223589a734b28d4..88da7e1737d451904f1ee3837a771270b3beb1a6 100644 (file)
@@ -43,32 +43,32 @@ __BEGIN_DECLS
 
 const asl_jump_table_t *asl_msg_list_jump_table(void);
 
 
 const asl_jump_table_t *asl_msg_list_jump_table(void);
 
-char *asl_msg_list_to_string(asl_msg_list_t *list, uint32_t *len) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_string_t *asl_msg_list_to_asl_string(asl_msg_list_t *list, uint32_t encoding) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_list_t *asl_msg_list_from_string(const char *buf) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+char *asl_msg_list_to_string(asl_msg_list_t *list, uint32_t *len) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_msg_list_to_asl_string(asl_msg_list_t *list, uint32_t encoding) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_list_t *asl_msg_list_from_string(const char *buf) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_list_t *asl_msg_list_new(void) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_list_t *asl_msg_list_retain(asl_msg_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_msg_list_release(asl_msg_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_msg_list_t *asl_msg_list_new(void) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_list_t *asl_msg_list_retain(asl_msg_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_list_release(asl_msg_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_list_t *asl_msg_list_new_count(uint32_t n) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_msg_list_insert(asl_msg_list_t *list, uint32_t x, void *obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_msg_list_t *asl_msg_list_new_count(uint32_t n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_list_insert(asl_msg_list_t *list, uint32_t x, void *obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-void asl_msg_list_append(asl_msg_list_t *list, void *obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_msg_list_prepend(asl_msg_list_t *list, void *obj) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-size_t asl_msg_list_count(asl_msg_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_t *asl_msg_list_get_index(asl_msg_list_t *list, size_t index) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_msg_list_remove_index(asl_msg_list_t *list, size_t index) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_t *asl_msg_list_next(asl_msg_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_t *asl_msg_list_prev(asl_msg_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_msg_list_reset_iteration(asl_msg_list_t *list, size_t position) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_list_t *asl_msg_list_search(asl_msg_list_t *list, asl_msg_t *query) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-asl_msg_list_t *asl_msg_list_match(asl_msg_list_t *list, asl_msg_list_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+void asl_msg_list_append(asl_msg_list_t *list, void *obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_list_prepend(asl_msg_list_t *list, void *obj) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+size_t asl_msg_list_count(asl_msg_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_t *asl_msg_list_get_index(asl_msg_list_t *list, size_t index) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_list_remove_index(asl_msg_list_t *list, size_t index) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_t *asl_msg_list_next(asl_msg_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_t *asl_msg_list_prev(asl_msg_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_msg_list_reset_iteration(asl_msg_list_t *list, size_t position) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_list_t *asl_msg_list_search(asl_msg_list_t *list, asl_msg_t *query) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_msg_list_t *asl_msg_list_match(asl_msg_list_t *list, asl_msg_list_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_list_t *asl_msg_search(asl_msg_t *msg, asl_msg_t *query) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-uint32_t asl_msg_match(asl_msg_t *msg, asl_msg_list_t *querylist, asl_msg_list_t **res, size_t *last, size_t start, size_t count, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+asl_msg_list_t *asl_msg_search(asl_msg_t *msg, asl_msg_t *query) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_msg_match(asl_msg_t *msg, asl_msg_list_t *querylist, asl_msg_list_t **res, size_t *last, size_t start, size_t count, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-int asl_msg_cmp_list(asl_msg_t *msg, asl_msg_list_t *list) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+int asl_msg_cmp_list(asl_msg_t *msg, asl_msg_list_t *list) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 __END_DECLS
 
 
 __END_DECLS
 
index 3e78284913ea2526e49da2835dcecb9034ae6ccb..7e000ecffe7c0f15bcf2ef957b4a9d103bb92df5 100644 (file)
@@ -51,7 +51,7 @@ typedef struct asl_jump_table_s
        asl_object_private_t *(*get_object_at_index)(asl_object_private_t *obj, size_t n);
        void (*set_iteration_index)(asl_object_private_t *obj, size_t n);
        void (*remove_object_at_index)(asl_object_private_t *obj, size_t n);
        asl_object_private_t *(*get_object_at_index)(asl_object_private_t *obj, size_t n);
        void (*set_iteration_index)(asl_object_private_t *obj, size_t n);
        void (*remove_object_at_index)(asl_object_private_t *obj, size_t n);
-       void (*append)(asl_object_private_t *obj, asl_object_private_t *newobj);
+       void (*append)(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr);
        void (*prepend)(asl_object_private_t *obj, asl_object_private_t *newobj);
        asl_object_private_t *(*search)(asl_object_private_t *obj, asl_object_private_t *query);
        asl_object_private_t *(*match)(asl_object_private_t *obj, asl_object_private_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t dir);
        void (*prepend)(asl_object_private_t *obj, asl_object_private_t *newobj);
        asl_object_private_t *(*search)(asl_object_private_t *obj, asl_object_private_t *query);
        asl_object_private_t *(*match)(asl_object_private_t *obj, asl_object_private_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t dir);
@@ -68,7 +68,7 @@ asl_object_private_t *asl_object_prev(asl_object_private_t *obj);
 asl_object_private_t *asl_object_get_object_at_index(asl_object_private_t *obj, size_t n);
 void asl_object_set_iteration_index(asl_object_private_t *obj, size_t n);
 void asl_object_remove_object_at_index(asl_object_private_t *obj, size_t n);
 asl_object_private_t *asl_object_get_object_at_index(asl_object_private_t *obj, size_t n);
 void asl_object_set_iteration_index(asl_object_private_t *obj, size_t n);
 void asl_object_remove_object_at_index(asl_object_private_t *obj, size_t n);
-void asl_object_append(asl_object_private_t *obj, asl_object_private_t *newobj);
+void asl_object_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr);
 void asl_object_prepend(asl_object_private_t *obj, asl_object_private_t *newobj);
 asl_object_private_t *asl_object_search(asl_object_private_t *obj, asl_object_private_t *query);
 asl_object_private_t *asl_object_match(asl_object_private_t *obj, asl_object_private_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t dir);
 void asl_object_prepend(asl_object_private_t *obj, asl_object_private_t *newobj);
 asl_object_private_t *asl_object_search(asl_object_private_t *obj, asl_object_private_t *query);
 asl_object_private_t *asl_object_match(asl_object_private_t *obj, asl_object_private_t *querylist, size_t *last, size_t start, size_t count, uint32_t duration, int32_t dir);
index 03cf96c73d19dbe9b21822b96f2ec698826fd89b..e30569da3185d15ecf03d060fa908886a8269c0d 100644 (file)
@@ -62,6 +62,9 @@
 
 #define ASL_KEY_FREE_NOTE "ASLFreeNotify"
 #define ASL_KEY_MESSAGETRACER "com.apple.message.domain"
 
 #define ASL_KEY_FREE_NOTE "ASLFreeNotify"
 #define ASL_KEY_MESSAGETRACER "com.apple.message.domain"
+#define ASL_KEY_POWERMANAGEMENT "com.apple.iokit.domain"
+#define ASL_KEY_LASTLOG "com.apple.system.lastlog"
+#define ASL_KEY_CFLOG_LOCAL_TIME "CFLog Local Time"
 
 /* remote control bits */
 #define EVAL_LEVEL_MASK   0x000000ff
 
 /* remote control bits */
 #define EVAL_LEVEL_MASK   0x000000ff
 
 __BEGIN_DECLS
 
 
 __BEGIN_DECLS
 
-int asl_store_location() __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-char *asl_remote_notify_name() __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-int asl_syslog_faciliy_name_to_num(const char *name) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-const char *asl_syslog_faciliy_num_to_name(int n) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-int asl_trigger_aslmanager(void) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-int asl_get_filter(asl_object_t client, int *local, int *master, int *remote, int *active) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
-uint32_t asl_set_local_control(asl_object_t client, uint32_t filter) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
-uint32_t asl_get_local_control(asl_object_t client) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0);
+int asl_store_location() __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+char *asl_remote_notify_name() __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int asl_syslog_faciliy_name_to_num(const char *name) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+const char *asl_syslog_faciliy_num_to_name(int n) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int asl_trigger_aslmanager(void) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+int asl_get_filter(asl_object_t client, int *local, int *master, int *remote, int *active) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_set_local_control(asl_object_t client, uint32_t filter) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_get_local_control(asl_object_t client) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 /* EXCLUSIVLY FOR USE BY DEV TOOLS */
 /* DO NOT USE THIS INTERFACE OTHERWISE */
 
 
 /* EXCLUSIVLY FOR USE BY DEV TOOLS */
 /* DO NOT USE THIS INTERFACE OTHERWISE */
 
-uint32_t asl_store_match_timeout(void *ignored, void *query_v1, void **result_v1, uint64_t *last_id, uint64_t start_id, uint32_t count, int32_t direction, uint32_t usec) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+uint32_t asl_store_match_timeout(void *ignored, void *query_v1, void **result_v1, uint64_t *last_id, uint64_t start_id, uint32_t count, int32_t direction, uint32_t usec) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 __END_DECLS
 
 
 __END_DECLS
 
index b266cb5ef421702b382e904b2deeaafe6b3711fc..47702ff09cf19741379f04c480aef0f33c3f1ac1 100644 (file)
@@ -77,26 +77,26 @@ __BEGIN_DECLS
 
 const asl_jump_table_t *asl_store_jump_table(void);
 
 
 const asl_jump_table_t *asl_store_jump_table(void);
 
-uint32_t asl_store_open_write(const char *basedir, asl_store_t **s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_store_open_read(const char *basedir, asl_store_t **s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_store_close(asl_store_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-asl_store_t *asl_store_retain(asl_store_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-void asl_store_release(asl_store_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
-uint32_t asl_store_statistics(asl_store_t *s, asl_msg_t **msg) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_store_open_write(const char *basedir, asl_store_t **s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_store_open_read(const char *basedir, asl_store_t **s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_store_close(asl_store_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_store_t *asl_store_retain(asl_store_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_store_release(asl_store_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_store_statistics(asl_store_t *s, asl_msg_t **msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_store_set_flags(asl_store_t *s, uint32_t flags) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0);
+uint32_t asl_store_set_flags(asl_store_t *s, uint32_t flags) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.10,10.12), ios(7.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_store_save(asl_store_t *s, asl_msg_t *msg) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_store_save(asl_store_t *s, asl_msg_t *msg) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-asl_msg_list_t *asl_store_match(asl_store_t *s, asl_msg_list_t *query, uint64_t *last, uint64_t start, uint32_t count, uint32_t duration, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+asl_msg_list_t *asl_store_match(asl_store_t *s, asl_msg_list_t *query, uint64_t *last, uint64_t start, uint32_t count, uint32_t duration, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_store_match_start(asl_store_t *s, uint64_t start_id, int32_t direction) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_store_match_next(asl_store_t *s, asl_msg_list_t *query, asl_msg_list_t **res, uint32_t count) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
+uint32_t asl_store_match_start(asl_store_t *s, uint64_t start_id, int32_t direction) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_store_match_next(asl_store_t *s, asl_msg_list_t *query, asl_msg_list_t **res, uint32_t count) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_store_max_file_size(asl_store_t *s, size_t max) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);
-uint32_t asl_store_sweep_file_cache(asl_store_t *s) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_3_2);
+uint32_t asl_store_max_file_size(asl_store_t *s, size_t max) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+uint32_t asl_store_sweep_file_cache(asl_store_t *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.5,10.12), ios(3.2,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 
-uint32_t asl_store_open_aux(asl_store_t *s, asl_msg_t *msg, int *fd, char **url) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
+uint32_t asl_store_open_aux(asl_store_t *s, asl_msg_t *msg, int *fd, char **url) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.7,10.12), ios(4.3,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 __END_DECLS
 
 
 __END_DECLS
 
index 28da85ab5fc4ee12f2ea19eba20fd890509a2044..2cd0ad9498bf4b6af6b96e51fd62bff0afe678ef 100644 (file)
@@ -40,18 +40,18 @@ typedef struct
        char *buf;
 } asl_string_t;
 
        char *buf;
 } asl_string_t;
 
-asl_string_t *asl_string_new(uint32_t encoding) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_retain(asl_string_t *str) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-void asl_string_release(asl_string_t *str) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-char *asl_string_release_return_bytes(asl_string_t *str) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-char *asl_string_bytes(asl_string_t *str) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-size_t asl_string_length(asl_string_t *str) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-size_t asl_string_allocated_size(asl_string_t *str) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_append(asl_string_t *str, const char *app) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_append_asl_key(asl_string_t *str, const char *app) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_append_op(asl_string_t *str, uint32_t op) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_append_no_encoding(asl_string_t *str, const char *app) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_append_char_no_encoding(asl_string_t *str, const char c) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
-asl_string_t *asl_string_append_xml_tag(asl_string_t *str, const char *tag, const char *s) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_1);
+asl_string_t *asl_string_new(uint32_t encoding) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_retain(asl_string_t *str) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+void asl_string_release(asl_string_t *str) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+char *asl_string_release_return_bytes(asl_string_t *str) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+char *asl_string_bytes(asl_string_t *str) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+size_t asl_string_length(asl_string_t *str) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+size_t asl_string_allocated_size(asl_string_t *str) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_append(asl_string_t *str, const char *app) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_append_asl_key(asl_string_t *str, const char *app) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_append_op(asl_string_t *str, uint32_t op) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_append_no_encoding(asl_string_t *str, const char *app) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_append_char_no_encoding(asl_string_t *str, const char c) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
+asl_string_t *asl_string_append_xml_tag(asl_string_t *str, const char *tag, const char *s) __API_DEPRECATED("os_log(3) has replaced asl(3)", macosx(10.8,10.12), ios(5.1,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
 
 #endif /* __ASL_STRING_H__ */
 
 #endif /* __ASL_STRING_H__ */
index 106aa9016196062a2699ec2dd06a47a2264479f7..42daafff367e0b048ab612438b51c6e532cab345 100644 (file)
 .Fa "asl_object_t obj"
 .Fc
 .Sh DESCRIPTION
 .Fa "asl_object_t obj"
 .Fc
 .Sh DESCRIPTION
+.Bf -symbolic
+This interface is obsoleted by
+.Xr os_log 3 .
+.Ef
+.Pp
 These routines provide an interface to the Apple System Log facility and to various
 data bearing memory objects, files, and storage directories.
 .Pp
 These routines provide an interface to the Apple System Log facility and to various
 data bearing memory objects, files, and storage directories.
 .Pp
index 8e268db107ba8eeebaf745b4574f9ee355afb580..7248d17984f2318076b79bce7da06b08b69cc744 100644 (file)
@@ -52,7 +52,7 @@
 #include <dispatch/dispatch.h>
 #include <libkern/OSAtomic.h>
 #include <os/activity.h>
 #include <dispatch/dispatch.h>
 #include <libkern/OSAtomic.h>
 #include <os/activity.h>
-#include <os/trace.h>
+#include <os/log.h>
 #include <os/log_private.h>
 #include <asl_ipc.h>
 #include <asl_client.h>
 #include <os/log_private.h>
 #include <asl_ipc.h>
 #include <asl_client.h>
  */
 #define SIZE_LIMIT_MSG "*** ASL MESSAGE SIZE (%u bytes) EXCEEDED MAXIMIMUM SIZE (%u bytes) ***"
 
  */
 #define SIZE_LIMIT_MSG "*** ASL MESSAGE SIZE (%u bytes) EXCEEDED MAXIMIMUM SIZE (%u bytes) ***"
 
-static const uint8_t shim_asl_to_trace_type[8] = {
-       OS_TRACE_TYPE_FAULT, OS_TRACE_TYPE_FAULT, OS_TRACE_TYPE_FAULT, // Emergency, Alert, Critical
-       OS_TRACE_TYPE_ERROR, // Error
-       OS_TRACE_TYPE_RELEASE, OS_TRACE_TYPE_RELEASE, OS_TRACE_TYPE_RELEASE, // Warning, Notice, Info
-       OS_TRACE_TYPE_DEBUG // Debug
+static const os_log_type_t shim_asl_to_log_type[8] = {
+       OS_LOG_TYPE_DEFAULT,    // ASL_LEVEL_EMERG
+       OS_LOG_TYPE_DEFAULT,    // ASL_LEVEL_ALERT
+       OS_LOG_TYPE_DEFAULT,    // ASL_LEVEL_CRIT
+       OS_LOG_TYPE_DEFAULT,    // ASL_LEVEL_ERR
+       OS_LOG_TYPE_DEFAULT,    // ASL_LEVEL_WARNING
+       OS_LOG_TYPE_DEFAULT,    // ASL_LEVEL_NOTICE
+       OS_LOG_TYPE_INFO,       // ASL_LEVEL_INFO
+       OS_LOG_TYPE_DEBUG       // ASL_LEVEL_DEBUG
 };
 
 };
 
-
 /* forward */
 static ASL_STATUS _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *mstring);
 /* forward */
 static ASL_STATUS _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *mstring);
+static ASL_STATUS _asl_send_message_text(asl_client_t *asl, asl_msg_t *sendmsg, asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *mstring, bool shimmed);
 __private_extern__ asl_client_t *_asl_open_default();
 
 /* notify SPI */
 __private_extern__ asl_client_t *_asl_open_default();
 
 /* notify SPI */
@@ -489,10 +493,6 @@ _asl_evaluate_send(asl_object_t client, asl_object_t m, int slevel)
        tunnel = (asl->filter & ASL_FILTER_MASK_TUNNEL) >> 8;
        if (tunnel != 0) eval |= EVAL_TUNNEL;
 
        tunnel = (asl->filter & ASL_FILTER_MASK_TUNNEL) >> 8;
        if (tunnel != 0) eval |= EVAL_TUNNEL;
 
-       /* don't send MessageTracer messages to Activity Tracing */
-       val = NULL;
-       if ((asl_msg_lookup(msg, ASL_KEY_MESSAGETRACER, &val, NULL) == 0) && (val != NULL)) eval &= ~EVAL_SEND_TRACE;
-
        if ((asl->options & ASL_OPT_NO_REMOTE) == 0)
        {
                pthread_mutex_lock(&_asl_global.lock);
        if ((asl->options & ASL_OPT_NO_REMOTE) == 0)
        {
                pthread_mutex_lock(&_asl_global.lock);
@@ -547,9 +547,122 @@ _asl_evaluate_send(asl_object_t client, asl_object_t m, int slevel)
        if ((filter != 0) && ((filter & lmask) == 0)) eval &= ~EVAL_SEND_ASL;
        if (asl->out_count > 0) eval |= EVAL_TEXT_FILE;
 
        if ((filter != 0) && ((filter & lmask) == 0)) eval &= ~EVAL_SEND_ASL;
        if (asl->out_count > 0) eval |= EVAL_TEXT_FILE;
 
+       /* don't send MessageTracer messages to Activity Tracing */
+       val = NULL;
+       if ((asl_msg_lookup(msg, ASL_KEY_MESSAGETRACER, &val, NULL) == 0) && (val != NULL)) eval &= ~EVAL_SEND_TRACE;
+
+       /* don't send PowerManagement messages to Activity Tracing */
+       val = NULL;
+       if ((asl_msg_lookup(msg, ASL_KEY_POWERMANAGEMENT, &val, NULL) == 0) && (val != NULL)) eval &= ~EVAL_SEND_TRACE;
+
+       /* don't send control messages to Activity Tracing */
+       val = NULL;
+       if ((asl_msg_lookup(msg, ASL_KEY_OPTION, &val, NULL) == 0) && (val != NULL)) eval &= ~EVAL_SEND_TRACE;
+
+       /* don't send lastlog/utmp messages to Activity Tracing */
+       val = NULL;
+       if ((asl_msg_lookup(msg, ASL_KEY_FACILITY, &val, NULL) == 0) && (val != NULL) && (!strcmp(val, ASL_KEY_LASTLOG))) eval &= ~EVAL_SEND_TRACE;
+
+       /* don't send CFLog messages to Activity Tracing */
+       val = NULL;
+       if ((asl_msg_lookup(msg, ASL_KEY_CFLOG_LOCAL_TIME, &val, NULL) == 0) && (val != NULL)) eval &= ~EVAL_SEND_TRACE;
+
        return eval;
 }
 
        return eval;
 }
 
+/*
+ * _asl_lib_vlog_text
+ * Internal routine used by asl_vlog.
+ * msg:  an asl messsage
+ * eval: log level and send flags for the message
+ * format: A formating string
+ * ap: va_list for the format
+ * returns 0 for success, non-zero for failure
+ */
+
+__private_extern__ ASL_STATUS
+_asl_lib_vlog_text(asl_object_t obj, uint32_t eval, asl_object_t msg, const char *format, va_list ap)
+{
+    int saved_errno = errno;
+    int status;
+    char *str, *fmt, estr[NL_TEXTMAX];
+    uint32_t i, len, elen, expand;
+
+    if (format == NULL) return ASL_STATUS_INVALID_ARG;
+
+    /* insert strerror for %m */
+    len = 0;
+    elen = 0;
+
+    expand = 0;
+    for (i = 0; format[i] != '\0'; i++)
+    {
+        if (format[i] == '%')
+        {
+            if (format[i+1] == '\0') len++;
+            else if (format[i+1] == 'm')
+            {
+                expand = 1;
+                strerror_r(saved_errno, estr, sizeof(estr));
+                elen = strlen(estr);
+                len += elen;
+                i++;
+            }
+            else
+            {
+                len += 2;
+                i++;
+            }
+        }
+        else len++;
+    }
+
+    fmt = (char *)format;
+
+    if (expand != 0)
+    {
+        fmt = malloc(len + 1);
+        if (fmt == NULL) return ASL_STATUS_NO_MEMORY;
+
+        len = 0;
+
+        for (i = 0; format[i] != '\0'; i++)
+        {
+            if (format[i] == '%')
+            {
+                if (format[i+1] == '\0')
+                {
+                }
+                else if ((format[i+1] == 'm') && (elen != 0))
+                {
+                    memcpy(fmt+len, estr, elen);
+                    len += elen;
+                    i++;
+                }
+                else
+                {
+                    fmt[len++] = format[i++];
+                    fmt[len++] = format[i];
+                }
+            }
+            else fmt[len++] = format[i];
+        }
+        
+        fmt[len] = '\0';
+    }
+    
+    str = NULL;
+    vasprintf(&str, fmt, ap);
+    if (expand != 0) free(fmt);
+    
+    if (str == NULL) return ASL_STATUS_NO_MEMORY;
+    
+    status = _asl_send_message_text(NULL, NULL, obj, eval, (asl_msg_t *)msg, str, true);
+    free(str);
+    
+    return status;
+}
+
 /*
  * _asl_lib_vlog
  * Internal routine used by asl_vlog.
 /*
  * _asl_lib_vlog
  * Internal routine used by asl_vlog.
@@ -656,28 +769,27 @@ asl_vlog(asl_object_t client, asl_object_t msg, int level, const char *format, v
 {
        ASL_STATUS status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(client, msg, level);
 {
        ASL_STATUS status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(client, msg, level);
+       void *addr = __builtin_return_address(0);
 
 
-       if (eval & EVAL_SEND_TRACE)
+       if ((eval & EVAL_SEND_TRACE) && os_log_shim_enabled(addr))
        {
                va_list ap_copy;
                if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
                if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
        {
                va_list ap_copy;
                if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
                if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
-               uint8_t trace_type = shim_asl_to_trace_type[level];
+               os_log_type_t type = shim_asl_to_log_type[level];
 
                va_copy(ap_copy, ap);
 
                va_copy(ap_copy, ap);
-               os_log_shim_with_va_list(__builtin_return_address(0), OS_LOG_DEFAULT, trace_type, format, ap_copy, ^(xpc_object_t xdict) {_asl_log_args_to_xpc(client, msg, xdict);} );
+               os_log_with_args(OS_LOG_DEFAULT, type, format, ap_copy, addr);
                va_end(ap_copy);
                va_end(ap_copy);
-       }
 
 
-       if (os_log_shim_legacy_logging_enabled() && (eval & EVAL_ASL))
+               if (eval & EVAL_TEXT_FILE)
+               {
+                       status = _asl_lib_vlog_text(client, eval, msg, format, ap);
+               }
+       }
+       else if (eval & EVAL_ASL)
        {
        {
-               asl_msg_t *smsg = asl_msg_new(ASL_TYPE_MSG);
-               if (eval & EVAL_SEND_TRACE) asl_msg_set_key_val(smsg, "ASLSHIM", "1");
-               smsg = asl_msg_merge(smsg, (asl_msg_t *)msg);
-
-               status = _asl_lib_vlog(client, eval, (asl_object_t)smsg, format, ap);
-
-               asl_msg_release(smsg);
+               status = _asl_lib_vlog(client, eval, msg, format, ap);
        }
 
        return (status == ASL_STATUS_OK) ? 0 : -1;
        }
 
        return (status == ASL_STATUS_OK) ? 0 : -1;
@@ -724,31 +836,33 @@ asl_log(asl_object_t client, asl_object_t msg, int level, const char *format, ..
 {
        ASL_STATUS status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(client, msg, level);
 {
        ASL_STATUS status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(client, msg, level);
+       void *addr = __builtin_return_address(0);
 
 
-       if (eval & EVAL_SEND_TRACE)
+       if ((eval & EVAL_SEND_TRACE) && os_log_shim_enabled(addr))
        {
                va_list ap;
                if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
                if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
        {
                va_list ap;
                if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
                if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
-               uint8_t trace_type = shim_asl_to_trace_type[level];
+               os_log_type_t type = shim_asl_to_log_type[level];
 
                va_start(ap, format);
 
                va_start(ap, format);
-               os_log_shim_with_va_list(__builtin_return_address(0), OS_LOG_DEFAULT, trace_type, format, ap, ^(xpc_object_t xdict) {_asl_log_args_to_xpc(client, msg, xdict);} );
+               os_log_with_args(OS_LOG_DEFAULT, type, format, ap, addr);
                va_end(ap);
                va_end(ap);
-       }
 
 
-       if (os_log_shim_legacy_logging_enabled() && (eval & EVAL_ASL))
+               if (eval & EVAL_TEXT_FILE)
+               {
+                       va_list ap;
+                       va_start(ap, format);
+                       status = _asl_lib_vlog_text(client, eval, msg, format, ap);
+                       va_end(ap);
+               }
+       }
+       else if (eval & EVAL_ASL)
        {
                va_list ap;
        {
                va_list ap;
-               asl_msg_t *smsg = asl_msg_new(ASL_TYPE_MSG);
-               if (eval & EVAL_SEND_TRACE) asl_msg_set_key_val(smsg, "ASLSHIM", "1");
-               smsg = asl_msg_merge(smsg, (asl_msg_t *)msg);
-
                va_start(ap, format);
                va_start(ap, format);
-               status = _asl_lib_vlog(client, eval, (asl_object_t)smsg, format, ap);
+               status = _asl_lib_vlog(client, eval, msg, format, ap);
                va_end(ap);
                va_end(ap);
-
-               asl_msg_release(smsg);
        }
 
        return (status == ASL_STATUS_OK) ? 0 : -1;
        }
 
        return (status == ASL_STATUS_OK) ? 0 : -1;
@@ -767,30 +881,33 @@ asl_log_message(int level, const char *format, ...)
 {
        ASL_STATUS status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(NULL, NULL, level);
 {
        ASL_STATUS status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(NULL, NULL, level);
+       void *addr = __builtin_return_address(0);
 
 
-       if (eval & EVAL_SEND_TRACE)
+       if ((eval & EVAL_SEND_TRACE) && os_log_shim_enabled(addr))
        {
                va_list ap;
                if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
                if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
        {
                va_list ap;
                if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
                if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
-               uint8_t trace_type = shim_asl_to_trace_type[level];
+               os_log_type_t type = shim_asl_to_log_type[level];
 
                va_start(ap, format);
 
                va_start(ap, format);
-               os_log_shim_with_va_list(__builtin_return_address(0), OS_LOG_DEFAULT, trace_type, format, ap, NULL);
+               os_log_with_args(OS_LOG_DEFAULT, type, format, ap, addr);
                va_end(ap);
                va_end(ap);
-       }
 
 
-       if (os_log_shim_legacy_logging_enabled() && (eval & EVAL_ASL))
+               if (eval & EVAL_TEXT_FILE)
+               {
+                       va_list ap;
+                       va_start(ap, format);
+                       status = _asl_lib_vlog_text(NULL, eval, NULL, format, ap);
+                       va_end(ap);
+               }
+       }
+       else if (eval & EVAL_ASL)
        {
                va_list ap;
        {
                va_list ap;
-               asl_msg_t *smsg = asl_msg_new(ASL_TYPE_MSG);
-               if (eval & EVAL_SEND_TRACE) asl_msg_set_key_val(smsg, "ASLSHIM", "1");
-
                va_start(ap, format);
                va_start(ap, format);
-               status = _asl_lib_vlog(NULL, eval, (asl_object_t)smsg, format, ap);
+               status = _asl_lib_vlog(NULL, eval, NULL, format, ap);
                va_end(ap);
                va_end(ap);
-
-               asl_msg_release(smsg);
        }
 
        return (status == ASL_STATUS_OK) ? 0 : -1;
        }
 
        return (status == ASL_STATUS_OK) ? 0 : -1;
@@ -1056,10 +1173,96 @@ _asl_set_option(asl_msg_t *msg, const char *opt)
        }
 }
 
        }
 }
 
+static ASL_STATUS
+_asl_send_message_text(asl_client_t *asl, asl_msg_t *sendmsg, asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *mstr, bool shimmed)
+{
+    int status;
+    uint32_t level, lmask;
+    asl_msg_t *release_sendmsg = NULL;
+
+    if (asl == NULL) {
+        if (obj == NULL) {
+            asl = _asl_open_default();
+            if (asl == NULL) return ASL_STATUS_FAILED;
+         } else {
+            uint32_t objtype = asl_get_type(obj);
+            if (objtype == ASL_TYPE_CLIENT) asl = (asl_client_t *)obj;
+        }
+    }
+
+    level = eval & EVAL_LEVEL_MASK;
+    if (level > 7) level = 7;
+    lmask = ASL_FILTER_MASK(level);
+
+    if (sendmsg == NULL) {
+        struct timeval tval = {0, 0};
+        const char *sstr, *fstr;
+
+        status = gettimeofday(&tval, NULL);
+        if (status != 0) {
+            time_t tick = time(NULL);
+            tval.tv_sec = tick;
+            tval.tv_usec = 0;
+        }
+
+        sstr = NULL;
+        status = asl_msg_lookup(msg, ASL_KEY_SENDER, &sstr, NULL);
+        if (status != 0) {
+            sstr = NULL;
+        }
+
+        fstr = NULL;
+        status = asl_msg_lookup(msg, ASL_KEY_FACILITY, &fstr, NULL);
+        if (status != 0) {
+            fstr = NULL;
+        }
+        sendmsg = asl_base_msg(asl, level, &tval, sstr, fstr, mstr);
+        if (sendmsg == NULL) {
+            return ASL_STATUS_FAILED;
+        }
+
+        release_sendmsg = sendmsg = asl_msg_merge(sendmsg, msg);
+    }
+
+    /* write to file descriptors */
+    for (uint32_t i = 0; i < asl->out_count; i++) {
+        if (shimmed) {
+            if ((asl->out_list[i].fd != STDOUT_FILENO) && (asl->out_list[i].fd != STDERR_FILENO)) {
+                continue; // new logging only support stdout/stderr
+            }
+        }
+
+        if ((asl->out_list[i].fd >= 0) && (asl->out_list[i].filter != 0) && ((asl->out_list[i].filter & lmask) != 0)) {
+            char *str;
+
+            uint32_t len = 0;
+            str = asl_format_message(sendmsg, asl->out_list[i].mfmt, asl->out_list[i].tfmt, asl->out_list[i].encoding, &len);
+            if (str == NULL) continue;
+
+            status = write(asl->out_list[i].fd, str, len - 1);
+            if (status < 0)
+            {
+                /* soft error for fd 2 (stderr) */
+                if (asl->out_list[i].fd == 2) status = 0;
+                asl->out_list[i].fd = -1;
+            } else {
+                status = 0;
+            }
+            
+            free(str);
+        }
+    }
+    if (release_sendmsg) {
+        asl_msg_release(release_sendmsg);
+    }
+
+    return status;
+}
+
 static ASL_STATUS
 _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *mstr)
 {
 static ASL_STATUS
 _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *mstr)
 {
-       uint32_t i, len, level, lmask, outstatus, objtype;
+       uint32_t len, level, lmask, outstatus, objtype;
        const char *sstr, *fstr;
        struct timeval tval = {0, 0};
        int status;
        const char *sstr, *fstr;
        struct timeval tval = {0, 0};
        int status;
@@ -1069,6 +1272,7 @@ _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *m
        asl_msg_t *qd_msg = NULL;
        asl_client_t *asl = NULL;
        static dispatch_once_t noquota_once;
        asl_msg_t *qd_msg = NULL;
        asl_client_t *asl = NULL;
        static dispatch_once_t noquota_once;
+       __block int log_quota_msg = 0;
 
        if ((eval & EVAL_ASL) == 0) return ASL_STATUS_OK;
 
 
        if ((eval & EVAL_ASL) == 0) return ASL_STATUS_OK;
 
@@ -1178,13 +1382,23 @@ _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *m
                else
                {
                        const char *qtest = getenv(NOQUOTA_ENV);
                else
                {
                        const char *qtest = getenv(NOQUOTA_ENV);
-                       if ((qtest != NULL) && (!strcmp(qtest, "1"))) _asl_global.quota = UINT32_MAX;
+                       if ((qtest != NULL) && (!strcmp(qtest, "1")))
+                       {
+                               _asl_global.quota = UINT32_MAX;
+                               log_quota_msg = 1;
+                       }
                }
 
                /* reset errno since we want stat() to fail silently */
                errno = save_errno;
        });
 
                }
 
                /* reset errno since we want stat() to fail silently */
                errno = save_errno;
        });
 
+       if (log_quota_msg != 0)
+       {
+               qd_msg = asl_base_msg(asl, QUOTA_LEVEL, &tval, sstr, fstr, QUOTA_DISABLED_MSG);
+               asl_msg_set_key_val(qd_msg, ASL_KEY_OPTION, ASL_OPT_STORE);
+       }
+
        if (((eval & EVAL_TUNNEL) == 0) && (_asl_global.quota != UINT32_MAX))
        {
                time_t last_send = _asl_global.last_send;
        if (((eval & EVAL_TUNNEL) == 0) && (_asl_global.quota != UINT32_MAX))
        {
                time_t last_send = _asl_global.last_send;
@@ -1243,8 +1457,18 @@ _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *m
                        len = asl_string_length(send_str);
                        vmsize = asl_string_allocated_size(send_str);
                        str = asl_string_release_return_bytes(send_str);
                        len = asl_string_length(send_str);
                        vmsize = asl_string_allocated_size(send_str);
                        str = asl_string_release_return_bytes(send_str);
-                       if (len != 0) kstatus = _asl_server_message(_asl_global.server_port, (caddr_t)str, len);
-                       if ((str != NULL) && (vmsize != 0)) vm_deallocate(mach_task_self(), (vm_address_t)str, vmsize);
+                       if (len != 0)
+                       {
+                               kstatus = _asl_server_message(_asl_global.server_port, (caddr_t)str, len);
+                               if (kstatus != KERN_SUCCESS)
+                               {
+                                       vm_deallocate(mach_task_self(), (vm_address_t)str, vmsize);
+                               }
+                       }
+                       else if (vmsize != 0)
+                       {
+                               vm_deallocate(mach_task_self(), (vm_address_t)str, vmsize);
+                       }
                        asl_msg_release(qd_msg);
                }
 
                        asl_msg_release(qd_msg);
                }
 
@@ -1296,28 +1520,7 @@ _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *m
 
        if ((sendmsg != NULL) && (asl->out_count > 0))
        {
 
        if ((sendmsg != NULL) && (asl->out_count > 0))
        {
-               /* write to file descriptors */
-               for (i = 0; i < asl->out_count; i++)
-               {
-                       if ((asl->out_list[i].fd >= 0) && (asl->out_list[i].filter != 0) && ((asl->out_list[i].filter & lmask) != 0))
-                       {
-                               char *str;
-
-                               len = 0;
-                               str = asl_format_message(sendmsg, asl->out_list[i].mfmt, asl->out_list[i].tfmt, asl->out_list[i].encoding, &len);
-                               if (str == NULL) continue;
-
-                               status = write(asl->out_list[i].fd, str, len - 1);
-                               if (status < 0)
-                               {
-                                       /* soft error for fd 2 (stderr) */
-                                       if (asl->out_list[i].fd != 2) outstatus = -1;
-                                       asl->out_list[i].fd = -1;
-                               }
-
-                               free(str);
-                       }
-               }
+               status = _asl_send_message_text(asl, sendmsg, obj, eval, msg, mstr, false);
        }
 
        asl_msg_release(sendmsg);
        }
 
        asl_msg_release(sendmsg);
@@ -1327,6 +1530,19 @@ _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *m
        return outstatus;
 }
 
        return outstatus;
 }
 
+static void
+os_log_with_args_wrapper(void *addr, int level, const char *format, ...)
+{
+       va_list ap;
+       if (level < ASL_LEVEL_EMERG) level = ASL_LEVEL_EMERG;
+       if (level > ASL_LEVEL_DEBUG) level = ASL_LEVEL_DEBUG;
+       os_log_type_t type = shim_asl_to_log_type[level];
+
+       va_start(ap, format);
+       os_log_with_args(OS_LOG_DEFAULT, type, format, ap, addr);
+       va_end(ap);
+}
+
 /*
  * asl_send: send a message 
  * This routine may be used instead of asl_log() or asl_vlog() if asl_set()
 /*
  * asl_send: send a message 
  * This routine may be used instead of asl_log() or asl_vlog() if asl_set()
@@ -1336,11 +1552,36 @@ _asl_send_message(asl_object_t obj, uint32_t eval, asl_msg_t *msg, const char *m
  * returns 0 for success, non-zero for failure
  */
 __private_extern__ ASL_STATUS
  * returns 0 for success, non-zero for failure
  */
 __private_extern__ ASL_STATUS
-asl_client_internal_send(asl_object_t obj, asl_object_t msg)
+asl_client_internal_send(asl_object_t obj, asl_object_t msg, void *addr)
 {
        int status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(obj, msg, -1);
 {
        int status = ASL_STATUS_OK;
        uint32_t eval = _asl_evaluate_send(obj, msg, -1);
-       if (eval != 0) status = _asl_send_message(obj, eval, (asl_msg_t *)msg, NULL);
+
+       const char *message = asl_msg_get_val_for_key((asl_msg_t *)msg, ASL_KEY_MSG);
+
+       if ((eval & EVAL_SEND_TRACE) && message && message[0] && os_log_shim_enabled(addr))
+       {
+               int level = ASL_LEVEL_DEBUG;
+               const char *lval = asl_msg_get_val_for_key((asl_msg_t *)msg, ASL_KEY_LEVEL);
+               if (lval != NULL) level = atoi(lval);
+
+               /*
+                * If the return address and the format string are from different
+                * binaries, os_log_with_args will not record the return address.
+                * Work around this by passing a dynamic format string.
+                */
+               char dynamic_format[] = "%s";
+               os_log_with_args_wrapper(addr, level, dynamic_format, message);
+
+               if (eval & EVAL_TEXT_FILE)
+               {
+                       status = _asl_send_message_text(NULL, NULL, obj, eval, (asl_msg_t *)msg, NULL, true);
+               }
+       }
+       else if (eval & EVAL_ASL)
+       {
+               status = _asl_send_message(obj, eval, (asl_msg_t *)msg, NULL);
+       }
 
        return status;
 }
 
        return status;
 }
index 7026a507d3a0d0c7741e2f15a4504a273878127f..fd87f34b6854920d7f68527cb83175627418d4e5 100644 (file)
@@ -48,7 +48,7 @@
 __private_extern__ ASL_STATUS asl_file_open_write_fd(int descriptor, asl_file_t **s);
 
 /* private asl SPI */
 __private_extern__ ASL_STATUS asl_file_open_write_fd(int descriptor, asl_file_t **s);
 
 /* private asl SPI */
-__private_extern__ ASL_STATUS asl_client_internal_send(asl_object_t client, asl_object_t msg);
+__private_extern__ ASL_STATUS asl_client_internal_send(asl_object_t client, asl_object_t msg, void *addr);
 
 #pragma mark -
 #pragma mark asl_client_t
 
 #pragma mark -
 #pragma mark asl_client_t
@@ -200,7 +200,7 @@ asl_client_release(asl_client_t *client)
 ASL_STATUS
 asl_client_send(asl_client_t *client, asl_msg_t *msg)
 {
 ASL_STATUS
 asl_client_send(asl_client_t *client, asl_msg_t *msg)
 {
-       return asl_client_internal_send((asl_object_t)client, (asl_object_t)msg);
+       return asl_client_internal_send((asl_object_t)client, (asl_object_t)msg, __builtin_return_address(0));
 }
 
 static asl_msg_list_t *
 }
 
 static asl_msg_list_t *
@@ -545,7 +545,7 @@ _jump_dealloc(asl_object_private_t *obj)
 }
 
 static void
 }
 
 static void
-_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj)
+_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr)
 {
        int type = asl_get_type((asl_object_t)newobj);
 
 {
        int type = asl_get_type((asl_object_t)newobj);
 
@@ -555,12 +555,12 @@ _jump_append(asl_object_private_t *obj, asl_object_private_t *newobj)
                asl_msg_list_reset_iteration((asl_msg_list_t *)newobj, 0);
                while (NULL != (msg = asl_msg_list_next((asl_msg_list_t *)newobj)))
                {
                asl_msg_list_reset_iteration((asl_msg_list_t *)newobj, 0);
                while (NULL != (msg = asl_msg_list_next((asl_msg_list_t *)newobj)))
                {
-                       if (asl_client_internal_send((asl_object_t)obj, (asl_object_t)msg) != ASL_STATUS_OK) return;
+                       if (asl_client_internal_send((asl_object_t)obj, (asl_object_t)msg, addr) != ASL_STATUS_OK) return;
                }
        }
        else if ((type == ASL_TYPE_MSG) || (type == ASL_TYPE_QUERY))
        {
                }
        }
        else if ((type == ASL_TYPE_MSG) || (type == ASL_TYPE_QUERY))
        {
-               asl_client_internal_send((asl_object_t)obj, (asl_object_t)newobj);
+               asl_client_internal_send((asl_object_t)obj, (asl_object_t)newobj, addr);
        }
 }
 
        }
 }
 
index f801364902058f25061aec5ba76fd748d9de328a..893699a53428750ac51c30d0111477dbf810621c 100644 (file)
@@ -9,7 +9,7 @@
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
  * compliance with the License. Please obtain a copy of the License at
  * http://www.opensource.apple.com/apsl/ and read it before using this
  * file.
- * 
+ *
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
@@ -17,7 +17,7 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- * 
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
  * @APPLE_LICENSE_HEADER_END@
  */
 
@@ -72,11 +72,11 @@ static inline int
 _read_redirect(int descriptor, int flush)
 {
     int total_read = 0;
 _read_redirect(int descriptor, int flush)
 {
     int total_read = 0;
-    int nbytes;
+    ssize_t nbytes;
     asl_redirect_t *aslr = &redirect_descriptors[descriptor];
 
     while ((nbytes = read(descriptor, aslr->w, BUF_SIZE - (aslr->w - aslr->buf) - 1)) > 0)
     asl_redirect_t *aslr = &redirect_descriptors[descriptor];
 
     while ((nbytes = read(descriptor, aslr->w, BUF_SIZE - (aslr->w - aslr->buf) - 1)) > 0)
-       {
+    {
         char *s, *p;
 
         /* Increment our returned number read */
         char *s, *p;
 
         /* Increment our returned number read */
@@ -88,19 +88,19 @@ _read_redirect(int descriptor, int flush)
 
         /* One line at a time */
         for (p = aslr->buf; p < aslr->w; p = s + 1)
 
         /* One line at a time */
         for (p = aslr->buf; p < aslr->w; p = s + 1)
-               {
+        {
             /* Find null or \n */
             for (s = p; *s && *s != '\n'; s++);
 
             if (*s == '\n') *s='\0';
 
             if (s < aslr->w || aslr->buf == p)
             /* Find null or \n */
             for (s = p; *s && *s != '\n'; s++);
 
             if (*s == '\n') *s='\0';
 
             if (s < aslr->w || aslr->buf == p)
-                       {
+            {
                 /* Either the first of multiple messages or one message which is larger than our buffer */
                 asl_log((aslclient)aslr->asl, (aslmsg)aslr->msg, aslr->level, "%s", p);
             }
                 /* Either the first of multiple messages or one message which is larger than our buffer */
                 asl_log((aslclient)aslr->asl, (aslmsg)aslr->msg, aslr->level, "%s", p);
             }
-                       else
-                       {
+            else
+            {
                 /* We reached the end of the buffer, move this chunk to the start. */
                 memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf));
                 aslr->w = aslr->buf + (s - p);
                 /* We reached the end of the buffer, move this chunk to the start. */
                 memmove(aslr->buf, p, BUF_SIZE - (p - aslr->buf));
                 aslr->w = aslr->buf + (s - p);
@@ -109,7 +109,7 @@ _read_redirect(int descriptor, int flush)
         }
 
         if (p == aslr->w)
         }
 
         if (p == aslr->w)
-               {
+        {
             /* Start writing at the beginning in the case where we cleared the buffer */
             aslr->w = aslr->buf;
         }
             /* Start writing at the beginning in the case where we cleared the buffer */
             aslr->w = aslr->buf;
         }
@@ -117,9 +117,9 @@ _read_redirect(int descriptor, int flush)
 
     /* Flush if requested or we're at EOF */
     if (flush || nbytes == 0)
 
     /* Flush if requested or we're at EOF */
     if (flush || nbytes == 0)
-       {
+    {
         if (aslr->w > aslr->buf)
         if (aslr->w > aslr->buf)
-               {
+        {
             *aslr->w = '\0';
             asl_log((aslclient)aslr->asl, (aslmsg)aslr->msg, aslr->level, "%s", aslr->buf);
         }
             *aslr->w = '\0';
             asl_log((aslclient)aslr->asl, (aslmsg)aslr->msg, aslr->level, "%s", aslr->buf);
         }
@@ -133,7 +133,7 @@ static void
 read_from_source(void *_source)
 {
     dispatch_source_t source = (dispatch_source_t)_source;
 read_from_source(void *_source)
 {
     dispatch_source_t source = (dispatch_source_t)_source;
-    int descriptor = dispatch_source_get_handle(source);
+    int descriptor = (int)dispatch_source_get_handle(source);
     if (_read_redirect(descriptor, 0) == EOF)  dispatch_source_cancel(source);
 }
 
     if (_read_redirect(descriptor, 0) == EOF)  dispatch_source_cancel(source);
 }
 
@@ -141,7 +141,7 @@ static void
 cancel_source(void *_source)
 {
     dispatch_source_t source = (dispatch_source_t)_source;
 cancel_source(void *_source)
 {
     dispatch_source_t source = (dispatch_source_t)_source;
-    int descriptor = dispatch_source_get_handle(source);
+    int descriptor = (int)dispatch_source_get_handle(source);
     asl_redirect_t *aslr = &redirect_descriptors[descriptor];
 
     /* Flush the buffer */
     asl_redirect_t *aslr = &redirect_descriptors[descriptor];
 
     /* Flush the buffer */
@@ -175,7 +175,9 @@ redirect_atexit(void)
     int i;
 
     /* stdout is linebuffered, so flush the buffer */
     int i;
 
     /* stdout is linebuffered, so flush the buffer */
-    if (redirect_descriptors[STDOUT_FILENO].buf) fflush(stdout);
+    if (n_redirect_descriptors > STDOUT_FILENO && redirect_descriptors[STDOUT_FILENO].buf) {
+        fflush(stdout);
+    }
 
     /* Cancel all of our dispatch sources, so they flush to ASL */
     for (i = 0; i < n_redirect_descriptors; i++) {
 
     /* Cancel all of our dispatch sources, so they flush to ASL */
     for (i = 0; i < n_redirect_descriptors; i++) {
@@ -214,7 +216,7 @@ asl_log_from_descriptor(aslclient ac, aslmsg am, int level, int descriptor)
     if (descriptor < 0) return EBADF;
 
     if (msg != NULL)
     if (descriptor < 0) return EBADF;
 
     if (msg != NULL)
-       {
+    {
         msg = asl_msg_copy(msg);
         if (msg == NULL) return ENOMEM;
     }
         msg = asl_msg_copy(msg);
         if (msg == NULL) return ENOMEM;
     }
@@ -224,45 +226,45 @@ asl_log_from_descriptor(aslclient ac, aslmsg am, int level, int descriptor)
 
         /* Reallocate if we need more space */
         if (descriptor >= n_redirect_descriptors)
 
         /* Reallocate if we need more space */
         if (descriptor >= n_redirect_descriptors)
-               {
+        {
             size_t new_n = 1 << (fls(descriptor) + 1);
             asl_redirect_t *new_array = realloc(redirect_descriptors, new_n * sizeof(*redirect_descriptors));
             if (!new_array)
             size_t new_n = 1 << (fls(descriptor) + 1);
             asl_redirect_t *new_array = realloc(redirect_descriptors, new_n * sizeof(*redirect_descriptors));
             if (!new_array)
-                       {
+            {
                 err = errno;
                 return;
             }
 
             redirect_descriptors = new_array;
             memset(redirect_descriptors + n_redirect_descriptors, 0, (new_n - n_redirect_descriptors) * sizeof(*redirect_descriptors));
                 err = errno;
                 return;
             }
 
             redirect_descriptors = new_array;
             memset(redirect_descriptors + n_redirect_descriptors, 0, (new_n - n_redirect_descriptors) * sizeof(*redirect_descriptors));
-            n_redirect_descriptors = new_n;
+            n_redirect_descriptors = (int)new_n;
         }
         }
-        
+
         /* If we're already listening on it, return error. */
         if (redirect_descriptors[descriptor].buf != NULL)
         /* If we're already listening on it, return error. */
         if (redirect_descriptors[descriptor].buf != NULL)
-               {
+        {
             err = EBADF;
             return;
         }
             err = EBADF;
             return;
         }
-        
+
         /* Initialize our buffer */
         redirect_descriptors[descriptor].buf = (char *)malloc(BUF_SIZE);
         if (redirect_descriptors[descriptor].buf == NULL)
         /* Initialize our buffer */
         redirect_descriptors[descriptor].buf = (char *)malloc(BUF_SIZE);
         if (redirect_descriptors[descriptor].buf == NULL)
-               {
+        {
             err = errno;
             return;
         }
 
         redirect_descriptors[descriptor].w = redirect_descriptors[descriptor].buf;
             err = errno;
             return;
         }
 
         redirect_descriptors[descriptor].w = redirect_descriptors[descriptor].buf;
-        
+
         /* Store our ASL settings */
         redirect_descriptors[descriptor].level = level;
         redirect_descriptors[descriptor].asl = asl_client_retain(asl);
         redirect_descriptors[descriptor].msg = msg;
         /* Store our ASL settings */
         redirect_descriptors[descriptor].level = level;
         redirect_descriptors[descriptor].asl = asl_client_retain(asl);
         redirect_descriptors[descriptor].msg = msg;
-        
+
         /* Don't block on reads from this descriptor */
         (void)fcntl(descriptor, F_SETFL, O_NONBLOCK);
         /* Don't block on reads from this descriptor */
         (void)fcntl(descriptor, F_SETFL, O_NONBLOCK);
-        
+
         /* Start listening */
         read_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, descriptor, 0, redirect_serial_q);
         redirect_descriptors[descriptor].read_source = read_source;
         /* Start listening */
         read_source = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, descriptor, 0, redirect_serial_q);
         redirect_descriptors[descriptor].read_source = read_source;
@@ -274,7 +276,7 @@ asl_log_from_descriptor(aslclient ac, aslmsg am, int level, int descriptor)
     });
 
     if (err) asl_msg_release(msg);
     });
 
     if (err) asl_msg_release(msg);
-    
+
     return err;
 }
 
     return err;
 }
 
@@ -291,15 +293,15 @@ asl_log_descriptor(aslclient ac, aslmsg am, int level, int descriptor, uint32_t
 
     /* Create pipe */
     if (pipe(pipepair) == -1)
 
     /* Create pipe */
     if (pipe(pipepair) == -1)
-       {
+    {
         retval = errno;
         errno = oerrno;
         return retval;
     }
         retval = errno;
         errno = oerrno;
         return retval;
     }
-    
+
     /* Close the read descriptor but not the write descriptor on exec */
     if (fcntl(pipepair[0], F_SETFD, FD_CLOEXEC) == -1)
     /* Close the read descriptor but not the write descriptor on exec */
     if (fcntl(pipepair[0], F_SETFD, FD_CLOEXEC) == -1)
-       {
+    {
         retval = errno;
         errno = oerrno;
         return retval;
         retval = errno;
         errno = oerrno;
         return retval;
@@ -307,7 +309,7 @@ asl_log_descriptor(aslclient ac, aslmsg am, int level, int descriptor, uint32_t
 
     /* Replace the existing descriptor */
     if (dup2(pipepair[1], descriptor) == -1)
 
     /* Replace the existing descriptor */
     if (dup2(pipepair[1], descriptor) == -1)
-       {
+    {
         close(pipepair[0]);
         close(pipepair[1]);
         retval = errno;
         close(pipepair[0]);
         close(pipepair[1]);
         retval = errno;
@@ -317,7 +319,7 @@ asl_log_descriptor(aslclient ac, aslmsg am, int level, int descriptor, uint32_t
 
     /* If we capture STDOUT_FILENO, make sure we linebuffer stdout */
     if (descriptor == STDOUT_FILENO) setlinebuf(stdout);
 
     /* If we capture STDOUT_FILENO, make sure we linebuffer stdout */
     if (descriptor == STDOUT_FILENO) setlinebuf(stdout);
-    
+
     /* Close the duplicate descriptors since they've been reassigned */
     close(pipepair[1]);
 
     /* Close the duplicate descriptors since they've been reassigned */
     close(pipepair[1]);
 
index 4b635291028bc2bcb6c434c5b3cb522278ece6a0..4afe59d6a20001027c950931b45f304686b255eb 100644 (file)
@@ -2551,7 +2551,7 @@ _jump_set_iteration_index(asl_object_private_t *obj, size_t n)
 }
 
 static void
 }
 
 static void
-_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj)
+_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr)
 {
        uint64_t xid;
        asl_file_t *s = (asl_file_t *)obj;
 {
        uint64_t xid;
        asl_file_t *s = (asl_file_t *)obj;
index 6f634dfd225167fb39fe1fd5cca697d01b99740b..f9b100af992f573fa4b0907e2302187225c65100 100644 (file)
@@ -3203,7 +3203,7 @@ _jump_count(asl_object_private_t *obj)
 }
 
 static void
 }
 
 static void
-_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj)
+_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr)
 {
        int type = asl_get_type((asl_object_t)newobj);
        if ((type != ASL_TYPE_QUERY) && (type != ASL_TYPE_MSG)) return;
 {
        int type = asl_get_type((asl_object_t)newobj);
        if ((type != ASL_TYPE_QUERY) && (type != ASL_TYPE_MSG)) return;
index a1e7ce8cb1780590e787a49d80647bedc1ebb16c..884069191ab1a9d4b155978c5c94bfb62ba0d698 100644 (file)
@@ -521,7 +521,7 @@ _jump_remove_object_at_index(asl_object_private_t *obj, size_t n)
 }
 
 static void
 }
 
 static void
-_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj)
+_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr)
 {
        int type = asl_get_type((asl_object_t)newobj);
        if ((type != ASL_TYPE_QUERY) && (type != ASL_TYPE_MSG)) return;
 {
        int type = asl_get_type((asl_object_t)newobj);
        if ((type != ASL_TYPE_QUERY) && (type != ASL_TYPE_MSG)) return;
index e09032e523dd204d6bfe46fdabc281675586daf3..6fc80e1515f5392f2e5c52db9170b27532a90b38 100644 (file)
@@ -159,7 +159,7 @@ asl_object_remove_object_at_index(asl_object_private_t *obj, size_t n)
 }
 
 void
 }
 
 void
-asl_object_append(asl_object_private_t *obj, asl_object_private_t *newobj)
+asl_object_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr)
 {
        uint32_t type = ASL_TYPE_CLIENT;
 
 {
        uint32_t type = ASL_TYPE_CLIENT;
 
@@ -168,7 +168,7 @@ asl_object_append(asl_object_private_t *obj, asl_object_private_t *newobj)
 
        dispatch_once(&asl_object_once, ^{ _asl_object_init(); });
        if (asl_jump[type]->append == NULL) return;
 
        dispatch_once(&asl_object_once, ^{ _asl_object_init(); });
        if (asl_jump[type]->append == NULL) return;
-       return asl_jump[type]->append(obj, newobj);
+       return asl_jump[type]->append(obj, newobj, addr);
 }
 
 void
 }
 
 void
@@ -313,7 +313,7 @@ asl_prev(asl_object_t obj)
 void
 asl_append(asl_object_t a, asl_object_t b)
 {
 void
 asl_append(asl_object_t a, asl_object_t b)
 {
-       asl_object_append((asl_object_private_t *)a, (asl_object_private_t *)b);
+       asl_object_append((asl_object_private_t *)a, (asl_object_private_t *)b, __builtin_return_address(0));
 }
 
 void
 }
 
 void
@@ -326,7 +326,7 @@ asl_prepend(asl_object_t a, asl_object_t b)
 int
 asl_send(asl_object_t a, asl_object_t b)
 {
 int
 asl_send(asl_object_t a, asl_object_t b)
 {
-       asl_object_append((asl_object_private_t *)a, (asl_object_private_t *)b);
+       asl_object_append((asl_object_private_t *)a, (asl_object_private_t *)b, __builtin_return_address(0));
        return 0;
 }
 
        return 0;
 }
 
index b03dbb665946b568de8fccb2d99fcc86d043ea07..e3e0f53391a5d7b7b780d39e9ede5f266ba120bb 100644 (file)
@@ -1066,7 +1066,7 @@ _jump_set_iteration_index(asl_object_private_t *obj, size_t n)
 }
 
 static void
 }
 
 static void
-_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj)
+_jump_append(asl_object_private_t *obj, asl_object_private_t *newobj, void *addr)
 {
        asl_store_t *s = (asl_store_t *)obj;
        int type = asl_get_type((asl_object_t)newobj);
 {
        asl_store_t *s = (asl_store_t *)obj;
        int type = asl_get_type((asl_object_t)newobj);
index 1975d4d2b699756086cbe4d05e87e3e810a66288..ae0c402f15ef137da7ec8e8790d69f8992d87348 100644 (file)
@@ -65,7 +65,7 @@
 #include <asl.h>
 #include <asl_msg.h>
 #include <asl_private.h>
 #include <asl.h>
 #include <asl_msg.h>
 #include <asl_private.h>
-#include <os/trace.h>
+#include <os/log.h>
 #include <os/log_private.h>
 
 #ifdef __STDC__
 #include <os/log_private.h>
 
 #ifdef __STDC__
@@ -95,15 +95,20 @@ __private_extern__ int _sl_mask = 0;
 
 #define EVAL_ASL (EVAL_SEND_ASL | EVAL_TEXT_FILE | EVAL_ASL_FILE)
 
 
 #define EVAL_ASL (EVAL_SEND_ASL | EVAL_TEXT_FILE | EVAL_ASL_FILE)
 
-static const uint8_t shim_syslog_to_trace_type[8] = {
-       OS_TRACE_TYPE_FAULT, OS_TRACE_TYPE_FAULT, OS_TRACE_TYPE_FAULT, // LOG_EMERG, LOG_ALERT, LOG_CRIT
-       OS_TRACE_TYPE_ERROR, // LOG_ERROR
-       OS_TRACE_TYPE_RELEASE, OS_TRACE_TYPE_RELEASE, OS_TRACE_TYPE_RELEASE, // LOG_WARN, LOG_NOTICE, LOG_INFO
-       OS_TRACE_TYPE_DEBUG // LOG_DEBUG
+static const os_log_type_t shim_syslog_to_log_type[8] = {
+       OS_LOG_TYPE_DEFAULT,    // LOG_EMERG
+       OS_LOG_TYPE_DEFAULT,    // LOG_ALERT
+       OS_LOG_TYPE_DEFAULT,    // LOG_CRIT
+       OS_LOG_TYPE_DEFAULT,    // LOG_ERR
+       OS_LOG_TYPE_DEFAULT,    // LOG_WARNING
+       OS_LOG_TYPE_DEFAULT,    // LOG_NOTICE
+       OS_LOG_TYPE_INFO,       // LOG_INFO
+       OS_LOG_TYPE_DEBUG       // LOG_DEBUG
 };
 
 extern uint32_t _asl_evaluate_send(asl_object_t client, asl_object_t m, int slevel);
 extern uint32_t _asl_lib_vlog(asl_object_t obj, uint32_t eval, asl_object_t msg, const char *format, va_list ap);
 };
 
 extern uint32_t _asl_evaluate_send(asl_object_t client, asl_object_t m, int slevel);
 extern uint32_t _asl_lib_vlog(asl_object_t obj, uint32_t eval, asl_object_t msg, const char *format, va_list ap);
+extern uint32_t _asl_lib_vlog_text(asl_object_t obj, uint32_t eval, asl_object_t msg, const char *format, va_list ap);
 
 
 /* SHIM SPI */
 
 
 /* SHIM SPI */
@@ -131,38 +136,59 @@ void
 vsyslog(int pri, const char *fmt, va_list ap)
 {
        int level = pri & LOG_PRIMASK;
 vsyslog(int pri, const char *fmt, va_list ap)
 {
        int level = pri & LOG_PRIMASK;
+       int fac = pri & LOG_FACMASK;
        uint32_t eval;
        uint32_t eval;
+       void *addr;
+
        _syslog_asl_client();
 
        eval = _asl_evaluate_send(_sl_asl, NULL, level);
        _syslog_asl_client();
 
        eval = _asl_evaluate_send(_sl_asl, NULL, level);
-       
-       if (eval & EVAL_SEND_TRACE)
+
+       /* don't send install messages to Activity Tracing */
+       if (fac == LOG_INSTALL || (fac == 0 && _sl_fac == LOG_INSTALL)) {
+               eval &= ~EVAL_SEND_TRACE;
+       }
+
+       addr = __builtin_return_address(0);
+
+       if ((eval & EVAL_SEND_TRACE) && os_log_shim_enabled(addr))
        {
                va_list ap_copy;
        {
                va_list ap_copy;
-               uint8_t trace_type = shim_syslog_to_trace_type[level];
+               os_log_type_t type = shim_syslog_to_log_type[level];
 
                va_copy(ap_copy, ap);
 
                va_copy(ap_copy, ap);
-               os_log_shim_with_va_list(__builtin_return_address(0), OS_LOG_DEFAULT, trace_type, fmt, ap_copy, NULL);
+               os_log_with_args(OS_LOG_DEFAULT, type, fmt, ap_copy, addr);
                va_end(ap_copy);
                va_end(ap_copy);
+
+               if (eval & EVAL_TEXT_FILE)
+               {
+                       asl_object_t msg = asl_new(ASL_TYPE_MSG);
+                       const char *facility;
+
+                       if (fac != 0)
+                       {
+                               facility = asl_syslog_faciliy_num_to_name(fac);
+                               if (facility != NULL) asl_set(msg, ASL_KEY_FACILITY, facility);
+                       }
+
+                       _asl_lib_vlog_text(_sl_asl, eval, msg, fmt, ap);
+
+                       asl_release(msg);
+               }
        }
        }
-       
-       if (os_log_shim_legacy_logging_enabled() && (eval & EVAL_ASL))
+       else if (eval & EVAL_ASL)
        {
                asl_object_t msg = asl_new(ASL_TYPE_MSG);
                const char *facility;
        {
                asl_object_t msg = asl_new(ASL_TYPE_MSG);
                const char *facility;
-               int fac = pri & LOG_FACMASK;
-               
+
                if (fac != 0)
                {
                        facility = asl_syslog_faciliy_num_to_name(fac);
                        if (facility != NULL) asl_set(msg, ASL_KEY_FACILITY, facility);
                }
                if (fac != 0)
                {
                        facility = asl_syslog_faciliy_num_to_name(fac);
                        if (facility != NULL) asl_set(msg, ASL_KEY_FACILITY, facility);
                }
-               
-               if (eval & EVAL_SEND_TRACE) asl_set(msg, "ASLSHIM", "2");
-               
+
                _asl_lib_vlog(_sl_asl, eval, msg, fmt, ap);
                _asl_lib_vlog(_sl_asl, eval, msg, fmt, ap);
-               
+
                asl_release(msg);
        }
 }
                asl_release(msg);
        }
 }
@@ -178,41 +204,69 @@ va_dcl
 #endif
 {
        int level = pri & LOG_PRIMASK;
 #endif
 {
        int level = pri & LOG_PRIMASK;
+       int fac = pri & LOG_FACMASK;
        uint32_t eval;
        uint32_t eval;
+       void *addr;
+
        _syslog_asl_client();
 
        eval = _asl_evaluate_send(_sl_asl, NULL, level);
        _syslog_asl_client();
 
        eval = _asl_evaluate_send(_sl_asl, NULL, level);
-       
-       if (eval & EVAL_SEND_TRACE)
+
+       /* don't send install messages to Activity Tracing */
+       if (fac == LOG_INSTALL || (fac == 0 && _sl_fac == LOG_INSTALL)) {
+               eval &= ~EVAL_SEND_TRACE;
+       }
+
+       addr = __builtin_return_address(0);
+
+       if ((eval & EVAL_SEND_TRACE) && os_log_shim_enabled(addr))
        {
                va_list ap;
        {
                va_list ap;
-               uint8_t trace_type = shim_syslog_to_trace_type[level];
-               
+               os_log_type_t type = shim_syslog_to_log_type[level];
+
 #ifdef __STDC__
                va_start(ap, fmt);
 #else
                va_start(ap);
 #endif
 #ifdef __STDC__
                va_start(ap, fmt);
 #else
                va_start(ap);
 #endif
-               os_log_shim_with_va_list(__builtin_return_address(0), OS_LOG_DEFAULT, trace_type, fmt, ap, NULL);
+               os_log_with_args(OS_LOG_DEFAULT, type, fmt, ap, addr);
                va_end(ap);
                va_end(ap);
+
+               if (eval & EVAL_TEXT_FILE)
+               {
+                       va_list ap;
+                       asl_object_t msg = asl_new(ASL_TYPE_MSG);
+                       const char *facility;
+
+                       if (fac != 0)
+                       {
+                               facility = asl_syslog_faciliy_num_to_name(fac);
+                               if (facility != NULL) asl_set(msg, ASL_KEY_FACILITY, facility);
+                       }
+
+#ifdef __STDC__
+                       va_start(ap, fmt);
+#else
+                       va_start(ap);
+#endif
+                       _asl_lib_vlog_text(_sl_asl, eval, msg, fmt, ap);
+                       va_end(ap);
+
+                       asl_release(msg);
+               }
        }
        }
-       
-       if (os_log_shim_legacy_logging_enabled() && (eval & EVAL_ASL))
+       else if (eval & EVAL_ASL)
        {
                va_list ap;
                asl_object_t msg = asl_new(ASL_TYPE_MSG);
                const char *facility;
        {
                va_list ap;
                asl_object_t msg = asl_new(ASL_TYPE_MSG);
                const char *facility;
-               int fac = pri & LOG_FACMASK;
 
                if (fac != 0)
                {
                        facility = asl_syslog_faciliy_num_to_name(fac);
                        if (facility != NULL) asl_set(msg, ASL_KEY_FACILITY, facility);
                }
 
                if (fac != 0)
                {
                        facility = asl_syslog_faciliy_num_to_name(fac);
                        if (facility != NULL) asl_set(msg, ASL_KEY_FACILITY, facility);
                }
-       
-               if (eval & EVAL_SEND_TRACE) asl_set(msg, "ASLSHIM", "2");
-               
+
 #ifdef __STDC__
                va_start(ap, fmt);
 #else
 #ifdef __STDC__
                va_start(ap, fmt);
 #else
@@ -220,7 +274,7 @@ va_dcl
 #endif
                _asl_lib_vlog(_sl_asl, eval, msg, fmt, ap);
                va_end(ap);
 #endif
                _asl_lib_vlog(_sl_asl, eval, msg, fmt, ap);
                va_end(ap);
-               
+
                asl_release(msg);
        }
 }
                asl_release(msg);
        }
 }
@@ -274,6 +328,8 @@ closelog()
        free(_sl_ident);
        _sl_ident = NULL;
 
        free(_sl_ident);
        _sl_ident = NULL;
 
+       _sl_fac = 0;
+
        pthread_mutex_unlock(&_sl_lock);
 }
 
        pthread_mutex_unlock(&_sl_lock);
 }
 
index 31b71001dddc721ce47ab27bbe1a79b6326b85e5..7a01c4c20e09b40465cc1d05edf53cab2372ea15 100644 (file)
                        name = executables;
                        productName = All;
                };
                        name = executables;
                        productName = All;
                };
+               721700891CCABF6F000FC779 /* executables_DaytonaBridge */ = {
+                       isa = PBXAggregateTarget;
+                       buildConfigurationList = 721700921CCABF6F000FC779 /* Build configuration list for PBXAggregateTarget "executables_DaytonaBridge" */;
+                       buildPhases = (
+                       );
+                       dependencies = (
+                               7217008A1CCABF6F000FC779 /* PBXTargetDependency */,
+                               7217008E1CCABF6F000FC779 /* PBXTargetDependency */,
+                               721700901CCABF6F000FC779 /* PBXTargetDependency */,
+                       );
+                       name = executables_DaytonaBridge;
+                       productName = All;
+               };
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
                        remoteGlobalIDString = 5039177B109140C30001165E;
                        remoteInfo = syslogd;
                };
                        remoteGlobalIDString = 5039177B109140C30001165E;
                        remoteInfo = syslogd;
                };
+               7217008B1CCABF6F000FC779 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 505ACB9C108FD16400197086;
+                       remoteInfo = aslcommon;
+               };
+               7217008F1CCABF6F000FC779 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 503917C71091413E0001165E;
+                       remoteInfo = util;
+               };
+               721700911CCABF6F000FC779 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 5039177B109140C30001165E;
+                       remoteInfo = syslogd;
+               };
                FCF3761810D2EED700C0EC8D /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
                FCF3761810D2EED700C0EC8D /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
                                503917C71091413E0001165E /* util */,
                                5039177B109140C30001165E /* syslogd */,
                                3F6F43C91613922800CA9ADB /* libsystem_asl */,
                                503917C71091413E0001165E /* util */,
                                5039177B109140C30001165E /* syslogd */,
                                3F6F43C91613922800CA9ADB /* libsystem_asl */,
+                               721700891CCABF6F000FC779 /* executables_DaytonaBridge */,
                        );
                };
 /* End PBXProject section */
                        );
                };
 /* End PBXProject section */
                        target = 5039177B109140C30001165E /* syslogd */;
                        targetProxy = 503A82131098FB9300B0D08A /* PBXContainerItemProxy */;
                };
                        target = 5039177B109140C30001165E /* syslogd */;
                        targetProxy = 503A82131098FB9300B0D08A /* PBXContainerItemProxy */;
                };
+               7217008A1CCABF6F000FC779 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 505ACB9C108FD16400197086 /* aslcommon */;
+                       targetProxy = 7217008B1CCABF6F000FC779 /* PBXContainerItemProxy */;
+               };
+               7217008E1CCABF6F000FC779 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 503917C71091413E0001165E /* util */;
+                       targetProxy = 7217008F1CCABF6F000FC779 /* PBXContainerItemProxy */;
+               };
+               721700901CCABF6F000FC779 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 5039177B109140C30001165E /* syslogd */;
+                       targetProxy = 721700911CCABF6F000FC779 /* PBXContainerItemProxy */;
+               };
                FCF3761910D2EED700C0EC8D /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = 505ACB9C108FD16400197086 /* aslcommon */;
                FCF3761910D2EED700C0EC8D /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = 505ACB9C108FD16400197086 /* aslcommon */;
                        baseConfigurationReference = 3F6B6314185AF66C00F692C5 /* util.xcconfig */;
                        buildSettings = {
                                ALWAYS_SEARCH_USER_PATHS = NO;
                        baseConfigurationReference = 3F6B6314185AF66C00F692C5 /* util.xcconfig */;
                        buildSettings = {
                                ALWAYS_SEARCH_USER_PATHS = NO;
-                               "CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = util.tproj/entitlements.plist;
+                               CODE_SIGN_ENTITLEMENTS = util.tproj/entitlements.plist;
+                               "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "";
                                CODE_SIGN_IDENTITY = "-";
                                COPY_PHASE_STRIP = YES;
                                DEAD_CODE_STRIPPING = YES;
                                CODE_SIGN_IDENTITY = "-";
                                COPY_PHASE_STRIP = YES;
                                DEAD_CODE_STRIPPING = YES;
                        };
                        name = Release;
                };
                        };
                        name = Release;
                };
+               721700931CCABF6F000FC779 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COMBINE_HIDPI_IMAGES = YES;
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
+               721700921CCABF6F000FC779 /* Build configuration list for PBXAggregateTarget "executables_DaytonaBridge" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               721700931CCABF6F000FC779 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
 /* End XCConfigurationList section */
        };
        rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
 /* End XCConfigurationList section */
        };
        rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
index 83912fb9c358f267ba68c386d65360e81f3cb1f8..746cd4249e985b5793030569b702ec3347f8ef85 100644 (file)
@@ -591,13 +591,6 @@ aslmsg_verify(asl_msg_t *msg, uint32_t source, int32_t *kern_post_level, uid_t *
                asl_msg_set_key_val(msg, ASL_KEY_EXPIRE_TIME, buf);
        }
 
                asl_msg_set_key_val(msg, ASL_KEY_EXPIRE_TIME, buf);
        }
 
-       /* Set DB Expire Time for Filesystem errors */
-       if (!strcmp(fac, FSLOG_VAL_FACILITY))
-       {
-               snprintf(buf, sizeof(buf), "%llu", (unsigned long long) tick + FS_TTL_SEC);
-               asl_msg_set_key_val(msg, ASL_KEY_EXPIRE_TIME, buf);
-       }
-
        /*
         * special case handling of kernel disaster messages
         */
        /*
         * special case handling of kernel disaster messages
         */
index 8595462262843e181d790e912dc8731f10b30c77..ae8a6d49efd2272c150d984f028f0a4badd2c462 100644 (file)
@@ -417,8 +417,8 @@ _internal_send_to_direct_watchers(asl_msg_t *msg)
                        {
                                direct_watch[j] = direct_watch[i];
                                direct_watch_port[j] = direct_watch_port[i];
                        {
                                direct_watch[j] = direct_watch[i];
                                direct_watch_port[j] = direct_watch_port[i];
-                               j++;
                        }
                        }
+                       j++;
                }
        }
 
                }
        }
 
index 0e3b4e7f2fdf3c44d5cee10ddba71b45ac94ee3c..a4abf6bb4ec7f56dcdda7c9891ed839e3cd89510 100644 (file)
@@ -82,6 +82,10 @@ When invoked with the
 option, 
 .Nm 
 prints a usage message.
 option, 
 .Nm 
 prints a usage message.
+.Pp
+NOTE:  Most system logs have moved to a new logging system.  See
+.Xr log 1
+for more information.
 .Ss SENDING MESSAGES
 The
 .Fl s
 .Ss SENDING MESSAGES
 The
 .Fl s
@@ -861,11 +865,12 @@ This means that any files currently in use will be checkpointed when the
 .Nm syslog
 command completes.
 .Sh SEE ALSO
 .Nm syslog
 command completes.
 .Sh SEE ALSO
-.Xr syslogd 8 ,
+.Xr log 1 ,
 .Xr logger 1 ,
 .Xr asl 3 ,
 .Xr syslog 3 ,
 .Xr logger 1 ,
 .Xr asl 3 ,
 .Xr syslog 3 ,
-.Xr asl.conf 5 .
+.Xr asl.conf 5 ,
+.Xr syslogd 8
 .Sh HISTORY
 The
 .Nm
 .Sh HISTORY
 The
 .Nm
index 26629035584a67271f26331249b0c29fb73ee32a..baa90f4e3e5dc5083c1f757d77a2b5feb682aaf5 100644 (file)
@@ -280,6 +280,7 @@ usage(uint32_t section)
                fprintf(stderr, "   %c    prefix\n", MOD_PREFIX);
                fprintf(stderr, "   %c    suffix\n", MOD_SUFFIX);
                fprintf(stderr, "   %c    numeric comparison\n", MOD_NUMERIC);
                fprintf(stderr, "   %c    prefix\n", MOD_PREFIX);
                fprintf(stderr, "   %c    suffix\n", MOD_SUFFIX);
                fprintf(stderr, "   %c    numeric comparison\n", MOD_NUMERIC);
+               fprintf(stderr, "\n");
        }
 
        if ((section == HELP_ALL) || (section == HELP_STATS))
        }
 
        if ((section == HELP_ALL) || (section == HELP_STATS))
@@ -289,7 +290,10 @@ usage(uint32_t section)
                fprintf(stderr, "   -n n     prints stats for just the top n (e.g. top 10) senders\n");
                fprintf(stderr, "   -d path  reads the ASL database at the given path for statistics\n");
                fprintf(stderr, "   -v       verbose ([message_count total_data data_average] for 10 minute intervals)\n");
                fprintf(stderr, "   -n n     prints stats for just the top n (e.g. top 10) senders\n");
                fprintf(stderr, "   -d path  reads the ASL database at the given path for statistics\n");
                fprintf(stderr, "   -v       verbose ([message_count total_data data_average] for 10 minute intervals)\n");
+               fprintf(stderr, "\n");
        }
        }
+
+       fprintf(stderr, "NOTE:  Most system logs have moved to a new logging system.  See log(1) for more information.\n");
 }
 
 const char *
 }
 
 const char *
@@ -2753,6 +2757,8 @@ main(int argc, char *argv[])
        notify_file = -1;
        notify_token = -1;
 
        notify_file = -1;
        notify_token = -1;
 
+       fprintf(stderr, "NOTE:  Most system logs have moved to a new logging system.  See log(1) for more information.\n");
+
        /* set starting point */
        if (since_boot == 1)
        {
        /* set starting point */
        if (since_boot == 1)
        {