Supported {value_type} specifiers in os_log?

According to https://developer.apple.com/documentation/os/logging?language=objc, the following value types have built-in formatters in os_log:


time_t, timeval, timespec, errno, iec-bytes, bitrate, iec-bitrate and uuid_t.


But according to https://developer.apple.com/videos/play/wwdc2016/721 (28:42)


there is also support for sockaddr, in_addr and in6_addr via %{network:sockaddr}.*P, %{network:in_addr}d and %{network:in6_addr}.16P.


Are these officially supported so I can start using them, and if so, are there any other such 'undocumented' types that are also officially supported.

Replies

Hello,


Do a :


man os_log


-->


    Value type      Custom specifier        Example output
    BOOL            %{BOOL}d                YES
    bool            %{bool}d                true
    darwin.errno    %{darwin.errno}d        [32: Broken pipe]
    darwin.mode    %{darwin.mode}d          drwxr-xr-x
    darwin.signal  %{darwin.signal}d        [sigsegv: Segmentation Fault]
    time_t          %{time_t}d              2016-01-12 19:41:37
    timeval        %{timeval}.*P            2016-01-12 19:41:37.774236
    timespec        %{timespec}.*P          2016-01-12 19:41:37.2382382823
    bitrate        %{bitrate}d              123 kbps
    iec-bitrate    %{iec-bitrate}d          118 Kibps
    uuid_t          %{uuid_t}.16P            10742E39-0657-41F8-AB99-878C5EC2DCAA
    sockaddr        %{network:sockaddr}.*P  fe80::f:86ff:fee9:5c16
    in_addr        %{network:in_addr}d      127.0.0.1
    in6_addr        %{network:in6_addr}.16P  fe80::f:86ff:fee9:5c16