-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Cloud code logs #2370
Cloud code logs #2370
Conversation
- Match parse.com original logging
Current coverage is 91.81% (diff: 100%)@@ master #2370 diff @@
==========================================
Files 95 95
Lines 10633 10670 +37
Methods 1295 1303 +8
Messages 0 0
Branches 1736 1738 +2
==========================================
+ Hits 9764 9797 +33
- Misses 869 873 +4
Partials 0 0
|
@@ -94,7 +94,7 @@ function del(config, auth, className, objectId, clientSDK) { | |||
// Returns a promise for a {response, status, location} object. | |||
function create(config, auth, className, restObject, clientSDK) { | |||
enforceRoleSecurity('create', className, auth); | |||
var write = new RestWrite(config, auth, className, null, restObject, clientSDK); | |||
var write = new RestWrite(config, auth, className, null, restObject, null, clientSDK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started having SDK and version set on those objects :/
@flovilmart just tried the latest 2.2.17 release, how do I configure it to show just the messages from |
@tanmays thanks for reporting this, I noticed the same thing and unfortunately you can't turn them off currently. This is so the cloud code logs work in the dashboard, it's only showing the requests and responses of the cloud code functions and not every request to parse-server. In the future hopefully we will try to work the code so that the logs for the cloud code needed for the dashboard aren't also logged to the console unless in verbose mode. |
@TylerBrock thanks! Hopefully we can achieve the same behaviour as Parse.com dash where only console statements are logged and not req/res (unless verbose is on). Right now 99% of my code is via cloud code and my console log is barely readable. :( |
@tanmays Im having the same problem, code changes on FunctionsRouter.js now make the console unreadable, both on dev and on production. I would suggest a way to set winston log level in the server config. For now, do:
If you add this code before the |
@Siedrix You saved my life! I was hacking around in the logging adapters, and found this fix to be much much better. Since 2.2.18 release is completely broken, being able to fix the logging on 2.2.17 has saved me an enormous amount of money in logging costs (hosted logging). Edit: Unfortunately, it fixes items manually logged with winston, but not normal app logs. |
You should be able to set the logLevel on Parse server initialisation with 2.2.18. When you say completely broken, can you open more issues so we can cook 2.2.19 ASAP |
Hey there, Along with: BTW, I'm not hating on the hard work everyone has been doing! Good job everyone. Just a matter of fact for me :) |
@joeyslack the more contributions, the faster it will be solved :) |
Sorry if this is the wrong place to post... I'm guessing this has to be something with my setup, but I can no longer see logs other than those from the parse-server-push-adapter, new objects created, and console.log statements explicitly in the Cloud Code. I really want to see errors and info, but even verbose on, it's not working: verb parse-server-push-adapter GCM "message_id": "0:1472668642692974%a8fa1296f9fd7ecd" It was fine until I did a pull on master in the last week. I noticed there have been quite a few PRs for logging recently. With these changes are there any additional things we need to add to see the logs? I currently have this line in index.js: var logger = require('parse-server/lib/Adapters/Logger/FileLoggerAdapter').FileLoggerAdapter; and inside the new ParseServer block: I'm running my app on AWS Elastic Beanstalk. |
* Adds logging (info/error) when running cloudCode triggers * Adds logs for cloud-function calls - Match parse.com original logging
* Adds logging (info/error) when running cloudCode triggers * Adds logs for cloud-function calls - Match parse.com original logging
Fixes #2244