Skip to content

Log each Cloud Code call in a way that is similar to hosted Parse.com #1603

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

Closed
yuzeh opened this issue Apr 22, 2016 · 2 comments
Closed

Log each Cloud Code call in a way that is similar to hosted Parse.com #1603

yuzeh opened this issue Apr 22, 2016 · 2 comments

Comments

@yuzeh
Copy link
Contributor

yuzeh commented Apr 22, 2016

Is it currently available right now? If not, is there a plan to implement it?

@yuzeh yuzeh changed the title Log each Cloud Code call Log each Cloud Code call in a way that is similar to hosted Parse.com Apr 22, 2016
@blacha
Copy link
Contributor

blacha commented Apr 22, 2016

Right now you will have to use your own logger and wrap your cloud calls.

I currently have it set up something like this

function defineCloudFunc(name, func) {

  Parse.cloud.define(name, function(req, res) {
    Log.info('Called Cloud code "' + name + '"');
    func(req, res)
  }

}

We are still working on improving logging , There was a pull request (#1565) just put into master about exposing the logging adapter as request.log so you can use that to log inside of your cloud functions and triggers (beforeSave, afterSave etc..)

@yuzeh
Copy link
Contributor Author

yuzeh commented Apr 22, 2016

I did not think about this workaround. Cool!

@yuzeh yuzeh closed this as completed Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants