Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to change the log level of the logs emitted by cloud functions #8529

Closed
3 tasks done
alljinx opened this issue May 3, 2023 · 1 comment · Fixed by #8530
Closed
3 tasks done

Add option to change the log level of the logs emitted by cloud functions #8529

alljinx opened this issue May 3, 2023 · 1 comment · Fixed by #8530
Labels
type:feature New feature or improvement of existing feature

Comments

@alljinx
Copy link
Contributor

alljinx commented May 3, 2023

New Feature / Enhancement Checklist

Current Limitation

Parse Server can really get very wordy when actively using cloud functions :

"info: Ran cloud function getMyJdm for user wSnhVbbINh with: Input: {"filters":{..."

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.
This can quickly lead to oversized log files and drowned informations.

Version 6.0.0 of Parse Server introduced a feature to customize log level for triggers in Parse Server Options :
logLevels: { triggerAfter: 'debug', triggerBeforeError: 'error', triggerBeforeSuccess: 'info' }

I would suggest to add an option to also customize log level for cloud functions :
logLevels: { triggerAfter: 'debug', triggerBeforeError: 'error', triggerBeforeSuccess: 'info', cloudFunction: 'debug' }

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 a new options to logLevels configuration in order to fine-tune the cloud function log channel according Winston's one ('silly', 'debug', 'info', 'debug','warn').

Example Use Case

  1. Add "logLevels: { cloudFunction: 'debug' }" to Parse Server configuration
  2. Run a Cloud Function
  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

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants