Is it possible to see console.log on the server in a deployed meteor site?

I have a deployed site.

On this site I have a function I make using setInterval that modifies any old documents to the latest schema.

Basically, it looks like this and runs every 5 seconds.

Meteor.startup(function() {
return Meteor.setInterval(UpgradeToLatestVersion, 5000);

I have tested this on my local machine and it seems to be working.

However, when I deploy to my instance, this UpgradeToLatestVersion does not seem to be running.

I don’t know if it’s not running at all or if it’s running and failing. The UpgradeToLatestVersion function has got lots of console.log statements which of course I can see on the local machine. Is it possible to somehow log in to the deployed site and see any console.log outputs on the server?

If it’s running on a thing (meteor deploy, just use meteor logs and it’ll give you a tail of the log.

It’s not realtime, but it’ll give you the last bit of the logs, anyway.

Ah thanks that’s exactly what I was looking for.

1 Like