Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Docs: update to reflect logging configuration changes #258

Merged
merged 7 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions pages/docs/v3/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions pages/docs/v3/updating/3-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down