Where does probot log its output?


#1

I have remixed a probot app to get me started, but all “console.log” and “app.log” output disappears. I don’t see any output in the “status” pane, or when I run the app manually from the console. I even tried incorporating a 3rd party logger that was suggested here, but didn’t see any output from that either, which makes me question my setup.

First line of my app is “console.log(‘app.js running…’)” and I don’t see that anywhere. I see no errors indicating that my app is NOT running, and running “ps” in a console gives me the impression that it is indeed running.

Thanks for any pointers.


#2

Hi @iandouglas, welcome to the Glitch forums!

When I encounter this it’s often (more often than I care to admit) because I’m executing console.log() from a client-side JavaScript instead of a server-side one. It doesn’t sound like that’s what’s going on here but I thought I’d mention it.

Can you post either your project name or the project you remixed? I’d be happy to take a quick look in context. You can send it to support@glitch.com if you’d rather keep it private.


#3

Thanks Cori, I’ve sent in an email with the app. There are two JS files, and it’s called “app.js” which “requires” the other file. And “app.js” is what my packages.json will launch. I don’t see any errors indicating that it can’t find the right filename or anything, I just never see any output which makes me question whether it’s actually running my app or not.

Running it from the console says it’s running on port 3000 but again I don’t see any console.log output.


#4

Ok I poked around a little in there, and I’m not 100% certain what Probot is doing, but I think the probot command is hooking the startup process and checking to see if your app is properly probot configured, and it’s not running app.js when the initial setup’s not complete. If you go through the steps that the logs that are showing suggest (that is to say, visit your app’s homepage - you’ll need to append “.glitch.me” to the end of the domain that’s listed there) and follow that process, probot will configure your .env file correctly and then you should start to see the app.js code being evaluated. At least this is what I observed by remixing the Waffle.io project myself.

To allay any concerns you might have about the security of that process, the .env file is only visible to project members (and selected Glitch staff), so unless you explcitly invite someone no one will ever see what’s in your .env file (which will include the contents of a .pem file). You can read more about your project’s data privacy at http://help-center.glitch.me/help/env/ and http://help-center.glitch.me/help/privateproject/.

Let me know if that helps at all, and happy Glitching!


#5

hi Cori, thanks for taking a look. Logging seems to work okay now.

The app filled out the .env with the wrong github app but I was able to correct that, but I’m getting a JWT / crypto error now, likely because of how I’m trying to get the PEM data in the file.

Ian


#6

Ok, I’m not seeing that error right now, but let us know if there’s something we can do to help!


#7

All fixed, appreciate you jumping in so quickly!