Skip to content

Add option to change the log level of the logs emitted by triggers #8329

Closed
@alljinx

Description

@alljinx

New Feature / Enhancement Checklist

Current Limitation

Parse Server can really get very wordy when actively using triggers (beforeSave, afterSave) : this can quickly lead to oversized log files and drowned informations.

By default, theses messages are written to the log file using the 'info' channel. The only way to shut them off is to raise the log level of Parse Server to the 'warn' level.

Customization is a key characteristic of Parse Server. Developers should be able to modify the channel so they can enforce their log policy.

Feature / Enhancement Description

Add three log level options into the Parse Server config (logLevelTriggerAfterHook, logLevelTriggerSuccessBeforeHook, logLevelTriggerErrorBeforeHook) in order to fine-tune the triggers log channel according Winston's one ('info', 'debug','warn').

Example Use Case

  1. Add "logLevelUses: { triggerAfterHook: 'debug' }" to Parse Server configuration
  2. Save a Parse Object
  3. The log is not written on the 'info' channel anymore, but use the 'debug'.

Alternatives / Workarounds

The only way to shut them off is to raise the log level of Parse Server to the 'warn' level.

3rd Party References

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions