7

I'm using Meteor and Meteor UP for deployment. So far so good. I can deploy my project to my test Ubuntu server.

My problem is I don't know how to debug on server. If I use node.js and express, I can just write console.log("some error") to see logs.

The log file seems /var/log/upstart/.log But I could only find

 >> stepping down to gid: meteoruser
 >> stepping down to uid: meteoruser

Is there any way to output "console.log(something)" ?

I use Ubuntu-14.04 and Meteor 1.1.0.2.

Ko Ohhashi
  • 844
  • 1
  • 11
  • 23

1 Answers1

13

Yes, there is. Do console.log(something) as you normally would in your server-side code. Then from the Ubuntu server in your meteor-up directory (same place where you do mup deploy), do mup logs -f

That will allow you to monitor the logs in real-time.

UPDATE: For those using the new mupx, you can check the logs with mupx logs -f

(ref)

FullStack
  • 5,902
  • 4
  • 43
  • 77
  • Thanks. I can monitor logs in if (Meteor.isServer) {}. Outside of the block seems to show up in browser. – Ko Ohhashi May 29 '15 at 23:06
  • The expected behavior is that anything on the server logs to the server, anything on the client logs to the client. It can also be on both client and server if your `console.log` is on both. – FullStack May 30 '15 at 02:00
  • Thanks! If I only knew this for past 2 months. – mhlavacka Mar 10 '16 at 09:16