···3344#include <asl.h>
5566-extern void msgtracer_log_with_keys(char *key1, int value1, char *things, ...);
66+/**
77+ * how it seems to be used:
88+ * msgtracer_log_with_keys(
99+ * "message.id.here", // usually the bundle id of the caller plus some arbitrary message name
1010+ * ASL_LEVEL_<something>, // one of the asl log levels in `asl.h`
1111+ * // the rest of the arguments are just pairs of arguments
1212+ * // the pairs go a little something like this:
1313+ * kMsgTracerKey<some-key-name>, // one of the keys in `msgtracer_keys.h`
1414+ * <some-c-string-value> // value for the provided key
1515+ * ... // as many of those pairs as you want
1616+ * NULL // and finally you terminate it with `NULL` so the function knows where the arguments end
1717+ * )
1818+ */
1919+extern void msgtracer_log_with_keys(char* logger_id, int log_level, ...);
720821#endif
···11+#ifndef __MSGTRACER_KEYS_H__
22+#define __MSGTRACER_KEYS_H__
33+44+// from:
55+// `Security/OSX/libsecurity_ssl/Security/sslTransport.c`
66+// `Security/securityd/src/token.cpp`
77+// `IOKitUser/hidsystem.subproj/IOHIDLib.c`
88+// plus a little bit of common sense ;)
99+//
1010+// once again, i am amazed at Apple's failure to properly hide things
1111+#define kMsgTracerKeySignature "com.apple.message.signature"
1212+#define kMsgTracerKeySummarize "com.apple.message.summarize"
1313+#define kMsgTracerKeySignature2 "com.apple.message.signature2"
1414+1515+// these are good guesses
1616+#define kMsgTracerKeyValue "com.apple.message.value"
1717+#define kMsgTracerKeyValue2 "com.apple.message.value2"
1818+1919+#endif // __MSGTRACER_KEYS_H__