peachsim 0.1.1692 → 0.1.1700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +18273 -15925
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +2349 -1778
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +7885 -3334
- package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +297 -77
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +294 -74
- package/dist-lib/native-app-identity-project.cjs +48 -37
- package/dist-lib/native-app-identity-project.mjs +47 -36
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib.json +199 -79
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +19600 -15992
- package/dist-lib/swift-compile.cjs +640 -402
- package/dist-lib/swift-compile.mjs +595 -357
- package/dist-lib/swift-package.cjs +24 -20
- package/dist-lib/swift-package.mjs +23 -19
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +1559 -1208
- package/dist-lib/vite.cjs +251 -42
- package/dist-lib/worklet-executable.cjs +2 -2
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -0
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +68 -12
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -22
- package/src/nitro-compile.ts +32 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +168 -48
- package/src/swift-coverage/xcode-assets.ts +4 -3
- package/src/swift-host.ts +14 -3
- package/src/swift-objc-compile.ts +32 -5
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +43 -13
- package/src/swift-package.ts +33 -26
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +68 -19
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +8 -0
- package/src/vite-plugin.ts +0 -10
- package/src/xcode-project.ts +62 -42
- package/src/settings-flags.ts +0 -107
|
@@ -1,46 +1,204 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2015-2016 Apple Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#ifndef __OS_LOG_H__
|
|
6
|
+
#define __OS_LOG_H__
|
|
7
|
+
|
|
2
8
|
#include <stdint.h>
|
|
9
|
+
#include <stdbool.h>
|
|
10
|
+
#if __has_include(<mach-o/loader.h>)
|
|
11
|
+
#include <mach-o/loader.h>
|
|
12
|
+
#endif
|
|
13
|
+
/*
|
|
14
|
+
* Each of these header files has a standalone implementation for SDKs
|
|
15
|
+
* (e.g. RTKit) where the headers aren't available. Switch to using
|
|
16
|
+
* those, if made available.
|
|
17
|
+
*/
|
|
18
|
+
#if __has_include(<os/availability.h>)
|
|
19
|
+
#include <os/availability.h>
|
|
20
|
+
#else
|
|
21
|
+
#include <os/log_availability.h>
|
|
22
|
+
#endif
|
|
23
|
+
#if __has_include(<os/base.h>)
|
|
24
|
+
#include <os/base.h>
|
|
25
|
+
#else
|
|
26
|
+
#include <os/log_base.h>
|
|
27
|
+
#endif
|
|
28
|
+
#if __has_include(<os/object.h>)
|
|
3
29
|
#include <os/object.h>
|
|
4
|
-
#if OS_OBJECT_USE_OBJC
|
|
5
|
-
@protocol OS_os_log <NSObject>
|
|
6
|
-
@end
|
|
7
|
-
typedef NSObject<OS_os_log> *os_log_t;
|
|
8
30
|
#else
|
|
9
|
-
|
|
31
|
+
#include <os/log_object.h>
|
|
10
32
|
#endif
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
OS_LOG_TYPE_ERROR = 0x10,
|
|
16
|
-
OS_LOG_TYPE_FAULT = 0x11,
|
|
17
|
-
} os_log_type_t;
|
|
18
|
-
struct os_log_s;
|
|
19
|
-
extern struct os_log_s _os_log_default __attribute__((availability(macos,introduced=10.11), availability(ios,introduced=9.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0), visibility("default")));
|
|
20
|
-
#define OS_LOG_DEFAULT ((__bridge os_log_t)&_os_log_default)
|
|
21
|
-
extern void *__dso_handle;
|
|
22
|
-
#ifdef __cplusplus
|
|
23
|
-
extern "C" {
|
|
33
|
+
#include <os/trace.h>
|
|
34
|
+
|
|
35
|
+
#if !__has_builtin(__builtin_os_log_format)
|
|
36
|
+
#error using os/log.h requires Xcode 8 or later
|
|
24
37
|
#endif
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
|
|
39
|
+
__BEGIN_DECLS
|
|
40
|
+
|
|
41
|
+
#if OS_OBJECT_SWIFT3
|
|
42
|
+
OS_OBJECT_DECL_SWIFT(os_log);
|
|
43
|
+
#elif OS_OBJECT_USE_OBJC
|
|
44
|
+
OS_OBJECT_DECL(os_log);
|
|
45
|
+
#elif defined(__has_ptrcheck)
|
|
46
|
+
typedef struct os_log_s *__single os_log_t
|
|
47
|
+
LOG_SWIFT_NAME(OSLog) LOG_SWIFT_NEWTYPE(struct);
|
|
48
|
+
#else
|
|
49
|
+
typedef struct os_log_s *os_log_t;
|
|
50
|
+
#endif /* OS_OBJECT_USE_OBJC */
|
|
51
|
+
|
|
52
|
+
/*!
|
|
53
|
+
* @const OS_LOG_DISABLED
|
|
54
|
+
*
|
|
55
|
+
* @discussion
|
|
56
|
+
* Use this to disable a specific log message.
|
|
57
|
+
*/
|
|
58
|
+
#if OS_LOG_TARGET_HAS_10_13_FEATURES
|
|
59
|
+
#define OS_LOG_DISABLED OS_OBJECT_GLOBAL_OBJECT(os_log_t, _os_log_disabled)
|
|
60
|
+
API_AVAILABLE(macosx(10.13), ios(11.0), watchos(4.0), tvos(11.0))
|
|
61
|
+
OS_EXPORT
|
|
62
|
+
struct os_log_s _os_log_disabled;
|
|
63
|
+
#else
|
|
64
|
+
#define OS_LOG_DISABLED ((os_log_t _Nonnull)NULL)
|
|
33
65
|
#endif
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
66
|
+
|
|
67
|
+
/*!
|
|
68
|
+
* @const OS_LOG_DEFAULT
|
|
69
|
+
*
|
|
70
|
+
* @discussion
|
|
71
|
+
* Use this to log a message in accordance with current system settings.
|
|
72
|
+
*/
|
|
73
|
+
#define OS_LOG_DEFAULT OS_OBJECT_GLOBAL_OBJECT(os_log_t, _os_log_default)
|
|
74
|
+
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
|
|
75
|
+
OS_EXPORT
|
|
76
|
+
struct os_log_s _os_log_default;
|
|
77
|
+
|
|
78
|
+
/*!
|
|
79
|
+
* @enum os_log_type_t
|
|
80
|
+
*
|
|
81
|
+
* @discussion
|
|
82
|
+
* Supported log message types.
|
|
83
|
+
*
|
|
84
|
+
* @constant OS_LOG_TYPE_DEFAULT
|
|
85
|
+
* Equivalent type for "os_log()" messages, i.e., default messages that are
|
|
86
|
+
* always captured to memory or disk.
|
|
87
|
+
*
|
|
88
|
+
* @constant OS_LOG_TYPE_INFO
|
|
89
|
+
* Equivalent type for "os_log_info()" messages, i.e., additional informational
|
|
90
|
+
* messages.
|
|
91
|
+
*
|
|
92
|
+
* @constant OS_LOG_TYPE_DEBUG
|
|
93
|
+
* Equivalent type for "os_log_debug()" messages, i.e., debug messages.
|
|
94
|
+
*
|
|
95
|
+
* @constant OS_LOG_TYPE_ERROR
|
|
96
|
+
* Equivalent type for "os_log_error()" messages, i.e., messages indicating
|
|
97
|
+
* error conditions.
|
|
98
|
+
*
|
|
99
|
+
* @constant OS_LOG_TYPE_FAULT
|
|
100
|
+
* Equivalent type for "os_log_fault()" messages, i.e., messages indicating
|
|
101
|
+
* that an unexpected condition occurred that likely indicates the presence of a
|
|
102
|
+
* bug.
|
|
103
|
+
*/
|
|
104
|
+
OS_ENUM(os_log_type, uint8_t,
|
|
105
|
+
OS_LOG_TYPE_DEFAULT = 0x00,
|
|
106
|
+
OS_LOG_TYPE_INFO = 0x01,
|
|
107
|
+
OS_LOG_TYPE_DEBUG = 0x02,
|
|
108
|
+
OS_LOG_TYPE_ERROR = 0x10,
|
|
109
|
+
OS_LOG_TYPE_FAULT = 0x11,
|
|
110
|
+
) LOG_SWIFT_NAME(OSLogType);
|
|
111
|
+
|
|
112
|
+
/*!
|
|
113
|
+
* @function os_log_create
|
|
114
|
+
*
|
|
115
|
+
* @abstract
|
|
116
|
+
* Creates a log object to be used with other log related functions.
|
|
117
|
+
*
|
|
118
|
+
* @discussion
|
|
119
|
+
* Creates a log object to be used with other log related functions. The
|
|
120
|
+
* log object serves two purposes: (1) tag related messages by subsystem
|
|
121
|
+
* and category name for easy filtering, and (2) control logging system
|
|
122
|
+
* behavior for messages.
|
|
123
|
+
*
|
|
124
|
+
* @param subsystem
|
|
125
|
+
* The identifier of the given subsystem should be in reverse DNS form
|
|
126
|
+
* (i.e., com.company.mysubsystem).
|
|
127
|
+
*
|
|
128
|
+
* @param category
|
|
129
|
+
* The category within the given subsystem that specifies the settings for
|
|
130
|
+
* the log object.
|
|
131
|
+
*
|
|
132
|
+
* @result
|
|
133
|
+
* Returns an os_log_t value to be passed to other os_log API calls. The
|
|
134
|
+
* logging runtime maintains a global collection of all os_log_t objects, one
|
|
135
|
+
* per subsystem/category pair. The os_log_t for a given subsystem/category is
|
|
136
|
+
* created upon the first call to os_log_create and any subsequent calls return
|
|
137
|
+
* the same object. These objects are never deallocated, so dynamic creation
|
|
138
|
+
* (e.g. on a per-operation basis) is generally inappropriate.
|
|
139
|
+
*
|
|
140
|
+
* A value will always be returned to allow for dynamic enablement.
|
|
141
|
+
*/
|
|
142
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
143
|
+
OS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_OBJECT_RETURNS_RETAINED OS_NONNULL_ALL
|
|
144
|
+
os_log_t
|
|
145
|
+
os_log_create(const char *subsystem, const char *category)
|
|
146
|
+
LOG_SWIFT_NAME(OSLog.init(__subsystem:category:));
|
|
147
|
+
|
|
148
|
+
/*!
|
|
149
|
+
* @function os_log_info_enabled
|
|
150
|
+
*
|
|
151
|
+
* @abstract
|
|
152
|
+
* Returns if additional information is enabled
|
|
153
|
+
*
|
|
154
|
+
* @discussion
|
|
155
|
+
* Returns if additional information is enabled
|
|
156
|
+
*
|
|
157
|
+
* @param log
|
|
158
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
159
|
+
*
|
|
160
|
+
* @result
|
|
161
|
+
* Returns ‘true’ if info log messages are enabled.
|
|
162
|
+
*/
|
|
42
163
|
#define os_log_info_enabled(log) os_log_type_enabled(log, OS_LOG_TYPE_INFO)
|
|
43
|
-
|
|
164
|
+
|
|
165
|
+
/*!
|
|
166
|
+
* @function os_log_debug_enabled
|
|
167
|
+
*
|
|
168
|
+
* @abstract
|
|
169
|
+
* Returns if debug log messages are enabled for a particular log object.
|
|
170
|
+
*
|
|
171
|
+
* @discussion
|
|
172
|
+
* Returns if debug log messages are enabled for a particular log object.
|
|
173
|
+
*
|
|
174
|
+
* @param log
|
|
175
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
176
|
+
*
|
|
177
|
+
* @result
|
|
178
|
+
* Returns ‘true’ if debug log messages are enabled.
|
|
179
|
+
*/
|
|
180
|
+
#define os_log_debug_enabled(log) os_log_type_enabled(log, OS_LOG_TYPE_DEBUG)
|
|
181
|
+
|
|
182
|
+
/*!
|
|
183
|
+
* @function os_log_with_type
|
|
184
|
+
*
|
|
185
|
+
* @abstract
|
|
186
|
+
* Log a message using a specific type.
|
|
187
|
+
*
|
|
188
|
+
* @discussion
|
|
189
|
+
* Will log a message with the provided os_log_type_t.
|
|
190
|
+
*
|
|
191
|
+
* @param log
|
|
192
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
193
|
+
*
|
|
194
|
+
* @param type
|
|
195
|
+
* Pass a valid type from os_log_type_t.
|
|
196
|
+
*
|
|
197
|
+
* @param format
|
|
198
|
+
* A format string to generate a human-readable log message when the log
|
|
199
|
+
* line is decoded. This string must be a constant string, not dynamically
|
|
200
|
+
* generated. Supports all standard printf types in addition to %@ (objects).
|
|
201
|
+
*/
|
|
44
202
|
#define os_log_with_type(log, type, format, ...) __extension__({ \
|
|
45
203
|
os_log_t _log_tmp = (log); \
|
|
46
204
|
os_log_type_t _type_tmp = (type); \
|
|
@@ -49,8 +207,99 @@ void _os_log_debug_impl(void *dso, os_log_t log, os_log_type_t type, const char
|
|
|
49
207
|
(&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \
|
|
50
208
|
} \
|
|
51
209
|
})
|
|
52
|
-
|
|
53
|
-
|
|
210
|
+
|
|
211
|
+
/*!
|
|
212
|
+
* @function os_log
|
|
213
|
+
*
|
|
214
|
+
* @abstract
|
|
215
|
+
* Insert a log message into the Unified Logging and Tracing system.
|
|
216
|
+
*
|
|
217
|
+
* @discussion
|
|
218
|
+
* Insert a log message into the Unified Logging and Tracing system in
|
|
219
|
+
* accordance with the preferences specified by the provided log object.
|
|
220
|
+
* These messages cannot be disabled and therefore always captured either
|
|
221
|
+
* to memory or disk.
|
|
222
|
+
*
|
|
223
|
+
* When an os_activity_id_t is present, the log message will also be scoped by
|
|
224
|
+
* that identifier. Activities provide granular filtering of log messages
|
|
225
|
+
* across threads and processes.
|
|
226
|
+
*
|
|
227
|
+
* There is a physical cap of 1024 bytes per log line for dynamic content,
|
|
228
|
+
* such as %s and %@, that can be written to the persistence store.
|
|
229
|
+
* All content exceeding the limit will be truncated before it is
|
|
230
|
+
* written to disk.
|
|
231
|
+
*
|
|
232
|
+
* @param log
|
|
233
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
234
|
+
*
|
|
235
|
+
* @param format
|
|
236
|
+
* A format string to generate a human-readable log message when the log
|
|
237
|
+
* line is decoded. This string must be a constant string, not dynamically
|
|
238
|
+
* generated. Supports all standard printf types and %@ (objects).
|
|
239
|
+
*/
|
|
240
|
+
#define os_log(log, format, ...) \
|
|
241
|
+
os_log_with_type(log, OS_LOG_TYPE_DEFAULT, format, ##__VA_ARGS__)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
/*!
|
|
245
|
+
* @function os_log_info
|
|
246
|
+
*
|
|
247
|
+
* @abstract
|
|
248
|
+
* Insert an additional information log message into the Unified Logging
|
|
249
|
+
* and Tracing system.
|
|
250
|
+
*
|
|
251
|
+
* @discussion
|
|
252
|
+
* Insert a log message into the Unified Logging and Tracing system in
|
|
253
|
+
* accordance with the preferences specified by the provided log object.
|
|
254
|
+
*
|
|
255
|
+
* When an os_activity_id_t is present, the log message will also be scoped by
|
|
256
|
+
* that identifier. Activities provide granular filtering of log messages
|
|
257
|
+
* across threads and processes.
|
|
258
|
+
*
|
|
259
|
+
* There is a physical cap of 256 bytes per entry for dynamic content,
|
|
260
|
+
* i.e., %s and %@, that can be written to the persistence store. As such,
|
|
261
|
+
* all content exceeding the limit will be truncated before written to disk.
|
|
262
|
+
* Live streams will continue to show the full content.
|
|
263
|
+
*
|
|
264
|
+
* @param log
|
|
265
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
266
|
+
*
|
|
267
|
+
* @param format
|
|
268
|
+
* A format string to generate a human-readable log message when the log
|
|
269
|
+
* line is decoded. This string must be a constant string, not dynamically
|
|
270
|
+
* generated. Supports all standard printf types and %@ (objects).
|
|
271
|
+
*/
|
|
272
|
+
#define os_log_info(log, format, ...) \
|
|
273
|
+
os_log_with_type(log, OS_LOG_TYPE_INFO, format, ##__VA_ARGS__)
|
|
274
|
+
|
|
275
|
+
/*!
|
|
276
|
+
* @function os_log_debug
|
|
277
|
+
*
|
|
278
|
+
* @abstract
|
|
279
|
+
* Insert a debug log message into the Unified Logging and Tracing system.
|
|
280
|
+
*
|
|
281
|
+
* @discussion
|
|
282
|
+
* Insert a debug log message into the Unified Logging and Tracing system in
|
|
283
|
+
* accordance with the preferences specified by the provided log object.
|
|
284
|
+
*
|
|
285
|
+
* When an os_activity_id_t is present, the log message will also be scoped by
|
|
286
|
+
* that identifier. Activities provide granular filtering of log messages
|
|
287
|
+
* across threads and processes.
|
|
288
|
+
*
|
|
289
|
+
* There is a physical cap of 256 bytes per entry for dynamic content,
|
|
290
|
+
* i.e., %s and %@, that can be written to the persistence store. As such,
|
|
291
|
+
* all content exceeding the limit will be truncated before written to disk.
|
|
292
|
+
* Live streams will continue to show the full content.
|
|
293
|
+
*
|
|
294
|
+
* @param log
|
|
295
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
296
|
+
*
|
|
297
|
+
* @param format
|
|
298
|
+
* A format string to generate a human-readable log message when the log
|
|
299
|
+
* line is decoded. This string must be a constant string, not dynamically
|
|
300
|
+
* generated. Supports all standard printf types and %@ (objects).
|
|
301
|
+
*/
|
|
302
|
+
#if OS_LOG_TARGET_HAS_10_15_FEATURES
|
|
54
303
|
#define os_log_debug(log, format, ...) __extension__({ \
|
|
55
304
|
os_log_t _log_tmp = (log); \
|
|
56
305
|
os_log_type_t _type_tmp = OS_LOG_TYPE_DEBUG; \
|
|
@@ -59,6 +308,48 @@ void _os_log_debug_impl(void *dso, os_log_t log, os_log_type_t type, const char
|
|
|
59
308
|
(&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \
|
|
60
309
|
} \
|
|
61
310
|
})
|
|
311
|
+
#else
|
|
312
|
+
#define os_log_debug(log, format, ...) \
|
|
313
|
+
os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__)
|
|
314
|
+
#endif // OS_LOG_TARGET_HAS_10_15_FEATURES
|
|
315
|
+
|
|
316
|
+
/*!
|
|
317
|
+
* @function os_log_error
|
|
318
|
+
*
|
|
319
|
+
* @abstract
|
|
320
|
+
* Insert an error log message into the Unified Logging and Tracing system.
|
|
321
|
+
*
|
|
322
|
+
* @discussion
|
|
323
|
+
* Insert an error log message into the Unified Logging and Tracing system.
|
|
324
|
+
*
|
|
325
|
+
* When an os_activity_id_t is present, the log message will also be scoped by
|
|
326
|
+
* that identifier. Activities provide granular filtering of log messages
|
|
327
|
+
* across threads and processes.
|
|
328
|
+
*
|
|
329
|
+
* There is a physical cap of 256 bytes per entry for dynamic content,
|
|
330
|
+
* i.e., %s and %@, that can be written to the persistence store. As such,
|
|
331
|
+
* all content exceeding the limit will be truncated before written to disk.
|
|
332
|
+
* Live streams will continue to show the full content.
|
|
333
|
+
*
|
|
334
|
+
* Note, in a debugger, it is possible to set a breakpoint on _os_log_error_impl
|
|
335
|
+
* to break on any error being emitted.
|
|
336
|
+
*
|
|
337
|
+
* A common use of os_log_error is to log failures from system calls and
|
|
338
|
+
* library functions, including the value of errno. Like other system calls
|
|
339
|
+
* and library functions, the os_log functions do not preserve the value of
|
|
340
|
+
* errno across calls. errno can change even if the log message is logged
|
|
341
|
+
* successfully. Consider saving errno into a local variable before calling
|
|
342
|
+
* os_log, if you still need errno's value afterward.
|
|
343
|
+
*
|
|
344
|
+
* @param log
|
|
345
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
346
|
+
*
|
|
347
|
+
* @param format
|
|
348
|
+
* A format string to generate a human-readable log message when the log
|
|
349
|
+
* line is decoded. This string must be a constant string, not dynamically
|
|
350
|
+
* generated. Supports all standard printf types and %@ (objects).
|
|
351
|
+
*/
|
|
352
|
+
#if OS_LOG_TARGET_HAS_10_13_FEATURES
|
|
62
353
|
#define os_log_error(log, format, ...) __extension__({ \
|
|
63
354
|
os_log_t _log_tmp = (log); \
|
|
64
355
|
os_log_type_t _type_tmp = OS_LOG_TYPE_ERROR; \
|
|
@@ -67,6 +358,57 @@ void _os_log_debug_impl(void *dso, os_log_t log, os_log_type_t type, const char
|
|
|
67
358
|
(&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \
|
|
68
359
|
} \
|
|
69
360
|
})
|
|
361
|
+
#else
|
|
362
|
+
#define os_log_error(log, format, ...) \
|
|
363
|
+
os_log_with_type(log, OS_LOG_TYPE_ERROR, format, ##__VA_ARGS__)
|
|
364
|
+
#endif // OS_LOG_TARGET_HAS_10_13_FEATURES
|
|
365
|
+
|
|
366
|
+
/*!
|
|
367
|
+
* @function os_log_fault
|
|
368
|
+
*
|
|
369
|
+
* @abstract
|
|
370
|
+
* Insert a fault log message into the Unified Logging and Tracing system.
|
|
371
|
+
*
|
|
372
|
+
* @discussion
|
|
373
|
+
* Log a fault message into the Unified Logging and Tracing system.
|
|
374
|
+
*
|
|
375
|
+
* Faults should be used to report conditions which indicate the
|
|
376
|
+
* presence of a bug. Faults will gather more expensive contextual information
|
|
377
|
+
* and record it for later inspection. They may also be reported to other
|
|
378
|
+
* debugging tools for display or aggregation.
|
|
379
|
+
*
|
|
380
|
+
* Note that faults should only be used for unexpected error conditions in
|
|
381
|
+
* which there's a clear and safe recovery path.
|
|
382
|
+
*
|
|
383
|
+
* When an os_activity_id_t is present, the log message will also be scoped by
|
|
384
|
+
* that identifier. Activities provide granular filtering of log messages
|
|
385
|
+
* across threads and processes.
|
|
386
|
+
*
|
|
387
|
+
* There is a physical cap of 256 bytes per entry for dynamic content,
|
|
388
|
+
* i.e., %s and %@, that can be written to the persistence store. As such,
|
|
389
|
+
* all content exceeding the limit will be truncated before written to disk.
|
|
390
|
+
* Live streams will continue to show the full content.
|
|
391
|
+
*
|
|
392
|
+
* When composing user provided strings libtrace will cap the size in total of
|
|
393
|
+
* format specifiers. See libtrace/libtrace/format_internal.h for details.
|
|
394
|
+
* Libtrace will also truncate the total composed message to a length of
|
|
395
|
+
* EXIT_REASON_PAYLOAD_MAX_LEN bytes, which is the kernel's maximum limit
|
|
396
|
+
* for fault message length. See xnu/osfmk/kern/kcdata.h for details.
|
|
397
|
+
* Libtrace will truncate all fault payloads regardless of oversize messages
|
|
398
|
+
* being enabled before calling into the kernel.
|
|
399
|
+
*
|
|
400
|
+
* Note, in a debugger, it is possible to set a breakpoint on _os_log_fault_impl
|
|
401
|
+
* to break on any fault being emitted.
|
|
402
|
+
*
|
|
403
|
+
* @param log
|
|
404
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
405
|
+
*
|
|
406
|
+
* @param format
|
|
407
|
+
* A format string to generate a human-readable log message when the log
|
|
408
|
+
* line is decoded. This string must be a constant string, not dynamically
|
|
409
|
+
* generated. Supports all standard printf types and %@ (objects).
|
|
410
|
+
*/
|
|
411
|
+
#if OS_LOG_TARGET_HAS_10_13_FEATURES
|
|
70
412
|
#define os_log_fault(log, format, ...) __extension__({ \
|
|
71
413
|
os_log_t _log_tmp = (log); \
|
|
72
414
|
os_log_type_t _type_tmp = OS_LOG_TYPE_FAULT; \
|
|
@@ -75,3 +417,144 @@ void _os_log_debug_impl(void *dso, os_log_t log, os_log_type_t type, const char
|
|
|
75
417
|
(&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \
|
|
76
418
|
} \
|
|
77
419
|
})
|
|
420
|
+
#else
|
|
421
|
+
#define os_log_fault(log, format, ...) \
|
|
422
|
+
os_log_with_type(log, OS_LOG_TYPE_FAULT, format, ##__VA_ARGS__)
|
|
423
|
+
#endif // OS_LOG_TARGET_HAS_10_13_FEATURES
|
|
424
|
+
|
|
425
|
+
/*!
|
|
426
|
+
* @function os_log_type_enabled
|
|
427
|
+
*
|
|
428
|
+
* @abstract
|
|
429
|
+
* Evaluate if a specific log type is enabled before doing work
|
|
430
|
+
*
|
|
431
|
+
* @discussion
|
|
432
|
+
* Evaluate if a specific log type is enabled before doing work
|
|
433
|
+
*
|
|
434
|
+
* @param oslog
|
|
435
|
+
* Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
|
|
436
|
+
*
|
|
437
|
+
* @param type
|
|
438
|
+
* Pass a valid type from os_log_type_t.
|
|
439
|
+
*
|
|
440
|
+
* @result
|
|
441
|
+
* Will return a boolean.
|
|
442
|
+
*/
|
|
443
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
444
|
+
OS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_PURE
|
|
445
|
+
bool
|
|
446
|
+
os_log_type_enabled(os_log_t oslog, os_log_type_t type)
|
|
447
|
+
LOG_SWIFT_NAME(OSLog.isEnabled(self:type:));
|
|
448
|
+
|
|
449
|
+
/*!
|
|
450
|
+
* @function _os_log_impl
|
|
451
|
+
*
|
|
452
|
+
* @abstract
|
|
453
|
+
* Internal function that takes compiler generated encoding and captures the necessary content.
|
|
454
|
+
*/
|
|
455
|
+
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
|
|
456
|
+
OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED
|
|
457
|
+
void
|
|
458
|
+
_os_log_impl(void *dso, os_log_t log, os_log_type_t type,
|
|
459
|
+
const char *format, uint8_t *buf, uint32_t size);
|
|
460
|
+
|
|
461
|
+
/*!
|
|
462
|
+
* @function _os_log_debug_impl
|
|
463
|
+
*
|
|
464
|
+
* @abstract
|
|
465
|
+
* Internal function that is taken for any debug log emitted in the system.
|
|
466
|
+
*/
|
|
467
|
+
API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0))
|
|
468
|
+
OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED OS_COLD
|
|
469
|
+
void
|
|
470
|
+
_os_log_debug_impl(void *dso, os_log_t log, os_log_type_t type,
|
|
471
|
+
const char *format, uint8_t *buf, uint32_t size);
|
|
472
|
+
|
|
473
|
+
/*!
|
|
474
|
+
* @function _os_log_error_impl
|
|
475
|
+
*
|
|
476
|
+
* @abstract
|
|
477
|
+
* Internal function that is taken for any error emitted in the system.
|
|
478
|
+
*/
|
|
479
|
+
API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
|
|
480
|
+
OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED OS_COLD
|
|
481
|
+
void
|
|
482
|
+
_os_log_error_impl(void *dso, os_log_t log, os_log_type_t type,
|
|
483
|
+
const char *format, uint8_t *buf, uint32_t size);
|
|
484
|
+
|
|
485
|
+
/*!
|
|
486
|
+
* @function _os_log_fault_impl
|
|
487
|
+
*
|
|
488
|
+
* @abstract
|
|
489
|
+
* Internal function that is taken for any fault emitted in the system.
|
|
490
|
+
*/
|
|
491
|
+
API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
|
|
492
|
+
OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED OS_COLD
|
|
493
|
+
void
|
|
494
|
+
_os_log_fault_impl(void *dso, os_log_t log, os_log_type_t type,
|
|
495
|
+
const char *format, uint8_t *buf, uint32_t size);
|
|
496
|
+
|
|
497
|
+
/*
|
|
498
|
+
* Support for older iteration of API for source compatibility only...
|
|
499
|
+
*/
|
|
500
|
+
|
|
501
|
+
API_DEPRECATED("no longer supported, use os_log_debug(OS_LOG_DEFAULT, ...)",
|
|
502
|
+
macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))
|
|
503
|
+
OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED
|
|
504
|
+
void
|
|
505
|
+
_os_log_internal(void *dso, os_log_t log, os_log_type_t type, const char *message, ...);
|
|
506
|
+
|
|
507
|
+
API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
|
|
508
|
+
OS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_OBJECT_RETURNS_RETAINED OS_NOT_TAIL_CALLED OS_NONNULL_ALL
|
|
509
|
+
os_log_t
|
|
510
|
+
_os_log_create(void *dso, const char *subsystem, const char *category);
|
|
511
|
+
|
|
512
|
+
API_DEPRECATED("no longer suppored - always returns true",
|
|
513
|
+
macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))
|
|
514
|
+
OS_EXPORT OS_NOTHROW OS_WARN_RESULT
|
|
515
|
+
bool
|
|
516
|
+
os_log_is_enabled(os_log_t log);
|
|
517
|
+
|
|
518
|
+
API_DEPRECATED_WITH_REPLACEMENT("os_log_debug_enabled",
|
|
519
|
+
macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))
|
|
520
|
+
OS_EXPORT OS_NOTHROW OS_WARN_RESULT
|
|
521
|
+
bool
|
|
522
|
+
os_log_is_debug_enabled(os_log_t log);
|
|
523
|
+
|
|
524
|
+
API_DEPRECATED("no longer supported - use os_log with per-parameter privacy options",
|
|
525
|
+
macos(10.11,10.12), ios(9.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))
|
|
526
|
+
OS_NOTHROW OS_ALWAYS_INLINE
|
|
527
|
+
static inline void
|
|
528
|
+
_os_log_sensitive_deprecated(void) { }
|
|
529
|
+
|
|
530
|
+
#define os_log_sensitive(log, format, ...) __extension__({ \
|
|
531
|
+
os_log_with_type(log, OS_LOG_TYPE_DEFAULT, format, ##__VA_ARGS__); \
|
|
532
|
+
_os_log_sensitive_deprecated(); \
|
|
533
|
+
})
|
|
534
|
+
|
|
535
|
+
#define os_log_sensitive_debug(log, format, ...) __extension__({ \
|
|
536
|
+
os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__); \
|
|
537
|
+
_os_log_sensitive_deprecated(); \
|
|
538
|
+
})
|
|
539
|
+
|
|
540
|
+
#if !OS_LOG_TARGET_HAS_10_12_FEATURES
|
|
541
|
+
#undef os_log_with_type
|
|
542
|
+
#define os_log_with_type(log, type, format, ...) __extension__({ \
|
|
543
|
+
_Pragma("clang diagnostic push") \
|
|
544
|
+
_Pragma("clang diagnostic error \"-Wformat\"") \
|
|
545
|
+
_Static_assert(__builtin_constant_p(format), "format argument must be a string constant"); \
|
|
546
|
+
_os_log_internal(&__dso_handle, log, type, format, ##__VA_ARGS__); \
|
|
547
|
+
_Pragma("clang diagnostic pop") \
|
|
548
|
+
})
|
|
549
|
+
|
|
550
|
+
#undef os_log_debug_enabled
|
|
551
|
+
#define os_log_debug_enabled(...) os_log_is_debug_enabled(__VA_ARGS__)
|
|
552
|
+
|
|
553
|
+
#undef os_log_create
|
|
554
|
+
#define os_log_create(subsystem, category) \
|
|
555
|
+
_os_log_create(&__dso_handle, subsystem, category)
|
|
556
|
+
#endif // !OS_LOG_TARGET_HAS_10_12_FEATURES
|
|
557
|
+
|
|
558
|
+
__END_DECLS
|
|
559
|
+
|
|
560
|
+
#endif // !__OS_LOG_H__
|