Skip to content

Commit 85d9b05

Browse files
committed
Worked on Apple Unified Logging format support
1 parent da0f293 commit 85d9b05

File tree

3 files changed

+386
-87
lines changed

3 files changed

+386
-87
lines changed

documentation/Apple Unified Logging and Activity Tracing formats.asciidoc

Lines changed: 79 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,9 @@ Contains a 32-bit value
778778
| 0x02 | | [yellow-background]*Unknown (integer)* +
779779
Contains a 8-bit, 16-bit, 32-bit or 64-bit value
780780
3+|
781-
| 0x12 | | [yellow-background]*Unknown* +
782-
Contains a 32-bit value
781+
| 0x12 | | [yellow-background]*Unknown (format string precision)* +
782+
Contains a 32-bit value +
783+
This value has been seen to be used in combination with format strings like "%.16s" and "%.*s", where this value contains the number of characters of the string that should be printed.
783784
3+|
784785
| 0x20 | | [yellow-background]*Unknown (string)* +
785786
Consists of a <<tracev3_firehose_tracepoint_data_time_with_value_data_range,Firehose tracepoint string data item>> where the value data contains an UTF-8 encoded string with an optional end-of-string character.
@@ -802,7 +803,7 @@ Consists of a <<tracev3_firehose_tracepoint_data_time_with_value_data_range,Fire
802803
| 0x40 | | [yellow-background]*Unknown (string)* +
803804
Consists of a <<tracev3_firehose_tracepoint_data_time_with_value_data_range,Firehose tracepoint string data item>> where the value data contains an UTF-8 encoded string with an optional end-of-string character.
804805
| 0x41 | | [yellow-background]*Unknown (private string)* +
805-
Contains a 32-bit value
806+
Contains a 32-bit value, formatted as "<private>"
806807
| 0x42 | | [yellow-background]*Unknown (string)* +
807808
Consists of a <<tracev3_firehose_tracepoint_data_time_with_value_data_range,Firehose tracepoint string data item>> where the value data contains an UTF-8 encoded string with an optional end-of-string character.
808809
3+|
@@ -1027,26 +1028,70 @@ The built-in value type decoders are:
10271028
| "{darwin.errno}" | | Formatted as a system error, for example "[32: Broken pipe]"
10281029
| "{darwin.mode}" | | Formatted as a file mode value, for example "drwxr-xr-x"
10291030
| "{darwin.signal}" | | Formatted as a signal, for example "[sigsegv: Segmentation Fault]"
1030-
| "{errno}" | | Formatted as a system error, for example "[32: Broken pipe]"
10311031
| "{iec-bitrate}" | | Formatted as an IEC bit-rate value, for example "118 Kibps"
10321032
| "{iec-bytes}" | | Formatted as IEC bytes value, for example "4.61 KiB"
10331033
| "{in_addr}" | | Formatted as an IPv4 address, for example "127.0.0.1"
10341034
| "{in6_addr}" | | Formatted as an IPv6 address, for example "fe80::f:86ff:fee9:5c16"
1035-
| "{private}" | | Private log argument
1036-
| "{public}" | | Public log argument
10371035
| "{sockaddr}" | | Formatted as socket address, for example "fe80::f:86ff:fee9:5c16"
10381036
| "{time_t}" | | Formatted as a seconds precision date and time value, for example "2016-01-12 19:41:37"
10391037
| "{timespec}" | | Formatted as a nanoseconds precision date and time value, for example "2016-01-12 19:41:37.2382382823"
10401038
| "{timeval}" | | Formatted as a microseconds precision date and time value, for example "2016-01-12 19:41:37.774236"
10411039
| "{uuid_t}" | | Formatted as an UUID, for example "10742E39-0657-41F8-AB99-878C5EC2DCAA"
10421040
|===
10431041

1042+
Other observerd value type decoders are:
1043+
1044+
[cols="1,1,5",options="header"]
1045+
|===
1046+
| Value | Identifier | Description
1047+
| "{errno}" | | Formatted as a system error, for example "[32: Broken pipe]"
1048+
| "{location:_CLLocationManagerStateTrackerState}" | |
1049+
| "{location:_CLClientManagerStateTrackerState}" | |
1050+
| "{location:CLClientAuthorizationStatus}" | |
1051+
| "{location:CLDaemonStatus_Type::Reachability}" | |
1052+
| "{location:CLSubHarvesterIdentifier}" | |
1053+
| "{location:escape_only}" | |
1054+
| "{location:IOMessage}" | |
1055+
| "{location:SqliteResult}" | |
1056+
| "{mask.hash}" | |
1057+
| "{mdns:acceptable}" | |
1058+
| "{mdns:addrmv}" | |
1059+
| "{mdns:dns.counts}" | |
1060+
| "{mdns:dns.idflags}" | |
1061+
| "{mdns:dnshdr}" | |
1062+
| "{mdns:gaiopts}" | |
1063+
| "{mdns:nreason}" | |
1064+
| "{mdns:protocol}" | |
1065+
| "{mdns:rd.svcb}" | |
1066+
| "{mdns:rrtype}" | |
1067+
| "{mdns:yesno}" | |
1068+
| "{mdnsresponder:domain_name}" | |
1069+
| "{mdnsresponder:ip_addr}" | |
1070+
| "{mdnsresponder:mac_addr}" | |
1071+
| "{network:in_addr}" | |
1072+
| "{network:in6_addr}" | |
1073+
| "{network:sockaddr}" | |
1074+
| "{network:tcp_flags}" | |
1075+
| "{network:tcp_state}" | |
1076+
| "{odtypes:ODError}" | |
1077+
| "{odtypes:mbr_details}" | |
1078+
| "{odtypes:mbridtype}" | |
1079+
| "{odtypes:nt_sid_t}" | |
1080+
| "{sensitive}" | |
1081+
| "{private}" | | Private log argument
1082+
| "{public}" | | Public log argument
1083+
|===
1084+
1085+
[NOTE]
1086+
The public and private value type decoders can be used in combination with
1087+
other value type decoders for example "%{public,uuid_t}.16P".
1088+
10441089
The flags are defined as:
10451090

10461091
[cols="1,1,5",options="header"]
10471092
|===
10481093
| Value | Identifier | Description
1049-
| "#" | |
1094+
| "#" | | Value should be converted to an "alternate form"
10501095
| "0" | | Value should be padded with 0
10511096
| "-" | |
10521097
| " " | |
@@ -1069,36 +1114,45 @@ The length modifiers are defined as:
10691114
| "z" | | size_t
10701115
|===
10711116

1117+
The .precision is defined as:
1118+
1119+
[cols="1,1,5",options="header"]
1120+
|===
1121+
| Value | Identifier | Description
1122+
| "0" | | Observed that this has no effect in "%.0s"
1123+
| "*" | | An additional integer argument supplies the field width or precision.
1124+
|===
1125+
10721126
The types are defined as:
10731127

10741128
[cols="1,1,5",options="header"]
10751129
|===
10761130
| Value | Identifier | Description
10771131
| "@" | | Obj-C/CF/Swift object
1078-
| "a" | |
1079-
| "A" | |
1132+
| "a" | | Floating-point value
1133+
| "A" | | Floating-point value
10801134
| "c" | | Character value
1081-
| "C" | | Equivalent to "lc"
1135+
| "C" | | wide character value, equivalent to "lc"
10821136
| "d" | | Signed decimal integer value
1083-
| "D" | |
1084-
| "e" | |
1085-
| "E" | |
1086-
| "f" | |
1087-
| "F" | |
1088-
| "g" | |
1089-
| "G" | |
1090-
| "i" | |
1137+
| "D" | | Long signed decimal integer value, equivalent to "ld"
1138+
| "e" | | Floating-point value
1139+
| "E" | | Floating-point value
1140+
| "f" | | Floating-point value
1141+
| "F" | | Floating-point value
1142+
| "g" | | Floating-point value
1143+
| "G" | | Floating-point value
1144+
| "i" | | Signed decimal integer value
10911145
| "n" | |
1092-
| "o" | |
1093-
| "O" | |
1094-
| "p" | | Pointer value
1146+
| "o" | | Octal integer value
1147+
| "O" | | Long octal integer value, equivalent to "lo"
1148+
| "p" | | Pointer value, equivalent to "0x%x"
10951149
| "P" | | Binary data
10961150
| "s" | | String value
1097-
| "S" | | Equivalent to "ls"
1151+
| "S" | | Wide character string value, equivalent to "ls"
10981152
| "u" | | Unsigned decimal integer value
1099-
| "U" | |
1100-
| "x" | | Lower case hexadecimal interger value
1101-
| "X" | | Upper case hexadecimal interger value
1153+
| "U" | | Long unsigned decimal integer value, equivalent to "lu"
1154+
| "x" | | Hexadecimal interger value, formatter in lower case
1155+
| "X" | | Hexadecimal interger value, formatter in upper case
11021156
|===
11031157

11041158
=== Oversize chunk

0 commit comments

Comments
 (0)