diff --git a/pages/docs/v3/config/index.md b/pages/docs/v3/config/index.md index e6563062..f7210c64 100644 --- a/pages/docs/v3/config/index.md +++ b/pages/docs/v3/config/index.md @@ -75,12 +75,21 @@ export interface CapacitorConfig { bundledWebRuntime?: boolean; /** - * Hide or show the native logs for iOS and Android. + * The build configuration (as defined by the native app) under which Capacitor + * will send statements to the log system. This applies to log statements in + * native code as well as statements redirected from JavaScript (`console.debug`, + * `console.error`, etc.). Enabling logging will let statements render in the + * Xcode and Android Studio windows but can leak information on device if enabled + * in released builds. * - * @since 2.1.0 - * @default false + * 'none' = logs are never produced + * 'debug' = logs are produced in debug builds but not production builds + * 'production' = logs are always produced + * + * @since 3.0.0 + * @default debug */ - hideLogs?: boolean; + loggingBehavior?: 'none' | 'debug' | 'production'; /** * User agent of Capacitor Web View. @@ -180,14 +189,14 @@ export interface CapacitorConfig { webContentsDebuggingEnabled?: boolean; /** - * Hide or show the native logs for Android. + * The build configuration under which Capacitor will generate logs. * - * Overrides global `hideLogs` option. + * Overrides global `loggingBehavior` option. * - * @since 2.1.0 - * @default false + * @since 3.0.0 + * @default debug */ - hideLogs?: boolean; + loggingBehavior?: 'none' | 'debug' | 'production'; /** * Allowlist of plugins to include during `npx cap sync` for Android. @@ -298,14 +307,14 @@ export interface CapacitorConfig { allowsLinkPreview?: boolean; /** - * Hide or show the native logs for iOS. + * The build configuration under which Capacitor will generate logs. * - * Overrides global `hideLogs` option. + * Overrides global `loggingBehavior` option. * - * @since 1.1.0 - * @default false + * @since 3.0.0 + * @default debug */ - hideLogs?: boolean; + loggingBehavior?: 'none' | 'debug' | 'production'; /** * Allowlist of plugins to include during `npx cap sync` for iOS. diff --git a/pages/docs/v3/updating/3-0.md b/pages/docs/v3/updating/3-0.md index 19554f55..a9de5f97 100644 --- a/pages/docs/v3/updating/3-0.md +++ b/pages/docs/v3/updating/3-0.md @@ -125,6 +125,10 @@ While many of the plugin APIs remain the same to ease the migration process to C - **Filesystem** - `stat()` method now returns ctime and mtime timestamps in milliseconds on all platforms. Previously, iOS returned timestamps in seconds. +## Logging Changes + +The `hideLogs` configuration option has been deprecated in Capacitor 3. It has been replaced by a new `loggingBehavior` configuration option. Details can be found [in the config documentation.](docs/config) + ## iOS Capacitor 3 supports iOS 12+. Xcode 12+ is required. CocoaPods 1.8+ is recommended.