Skip to content

bug: Extra information in console logs #18190

Closed

Description

@cjorasch

Bug Report

Ionic version:
[x] 4.x

Current behavior:
Several components output information to the console during normal usage.

For example:

[ion-router] router will load
[ion-router] found nav
[ion-router] route changed [""]
Input: enableInputBlurring
Input: enableScrollPadding
[ion-router] nav changed -> update URL [{…}] ["x"]
Input: enableHideCaretOnScroll
Input: enableHideCaretOnScroll
input-base, pointerStart, type: touchstart
input-base, pointerEnd, type: touchend
native-input, hideCaret, shouldHideCaret: true, input value: x
native-input, hideCaret, shouldHideCaret: false, input value: x

Expected behavior:
Normal usage conditions should not output to the console unless specific logging is requested or configured.

Some issues with writing to the console:

  • Extra logging information adds noise that makes it harder to see intended logging information
  • Apps may be sending console output to cloud based loggers (like loggly) which results in lots of unneeded information being sent

If it is important to output detailed logging then it could be added as a config setting or a param to the component to specify logging is desired.

Activity

  1. liamdebeasi commented on May 21, 2019

    @liamdebeasi
    Contributor

    Hi there,

    Thanks for the issue! This has been resolved via #18245 and will be included in the next Ionic release. I intentionally kept in some router debug logs since they have been helpful in the past for debugging.

    A future Ionic update will introduce a setting that strips log/debug statements from production builds (allowing developers to keep debug statements in but not have it get shipped with every release). This is dependent on a Stencil change.

    Thanks for using Ionic!

  2. added a commit that references this issue on May 22, 2019
    3da7254
  3. ionitron-bot commented on Jun 20, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  4. locked and limited conversation to collaborators on Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: core

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions