Skip to content

feat: support disabling ionic warnings / non-error logs in production #27231

@lincolnthree

Description

@lincolnthree

Prerequisites

Describe the Feature Request

We'd like to be able to globally disable Ionic Developer logs in production, via a config flag, like this (Angular example):

app.module.ts

    IonicModule.forRoot({
      logsEnabled: !environment.production
    }),

Describe the Use Case

Currently, various warnings like these are logged for the benefit of developers, however, they get pulled into production log tracing systems like https://sentry.io, and other aggregators. And they're artificially inflating our debug/production issue logs, creating distractions, and clutter:

image
Can you spot the actual error?

Describe Preferred Solution

app.module.ts

    IonicModule.forRoot({
      logsEnabled: !environment.production
    }),

Describe Alternatives

Logs can be filtered out when debugging in Chrome/Safari, etc. But you have to remember to do this, and it doesn't solve the problem for production log aggregating services/systems.

Related Code

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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