Meteor - How can I see console.log in the server side? - meteor

I'm debugging a big open source project written by meteor (https://github.com/wekan/wekan).
I added some console.log() debug code, use $ meteor to run the project under the command line, but I can't see anything printed in the console nor in the browser F12.
I reached some similar questions but I can only find "it just works" or "it's in the browser console" answers. I have no idea what I am doing wrong. Does the console.log() will just print the logs in my command line console?
Thank you!

Related

How do perform logging or debug output in a server script?

I'd like to output some data to the console or any other visible place to help with debugging. Apparently Logger.log() doesn't do that, or if it does, I have no idea where to see the results (at least in the preview mode).
Is there any functionality for debug output in the server scripts?
I strongly encourage you to check the official documentation to get to know the basics. Using console.log("test") will log anything to the server side logs, which you can access from the preview mode.

How to use console.log in meteor jasmine tests

I'm using
Meteor 1.0.2.1
sanjo:jasmine 0.9.1
velocity:html-reporter 0.3.2
https://doctorllama.wordpress.com/2014/09/22/bullet-proof-internationalised-meteor-applications-with-velocity-unit-testing-integration-testing-and-jasmine/ says I should be able to use console.log() to see output in the console.
But nothing happens for me.
If I move the call out of tests/jasmine into client/ or server/ then the output is on the terminal where meteor is run.
The html-reporter also has a section called Logs. Looking at the code it appears to have a reactive collection on VelocityLogs. My google-fu is failing me as I can find no information on how to get any output to display in this section.
What is the correct way of logging in jasmine tests?
In Chrome the client side logs are visible through the JavaScript Console.
But I still don't know where the server side logs might be.
I've run with DEBUG=1 JASMINE_DEBUG=1 VELOCITY_DEBUG=1 VELOCITY_DEBUG_MIRROR=1 and the console logs do not appear either.
Edit:
I've created a repo to provide an example of the problems at https://github.com/baerrach/meteor-velocity-issue-223.
If you are running server integration tests and they're not appearing, you may have found a bug!
Try running with:
VELOCITY_DEBUG=1 meteor
The logs should appear in the same place as the main meteor logs appear, prefixed with [velocity-mirror]

pyinstaller program not working if built without console

I have a small app that I'm trying to build against windows machines. The program creates an OpenVPN connection. If I build the program and run it it first opens a console as the program output. If I pass the -w parameter to pyinstaller to not build it with a console attached the program fails to run at all. It opens allright but the vpn connection is never created.
With the console everything works perfect.
I also have a basic logging for the application in place to see where my code might stop and nothing gets written. With console on my program spits out all kinds of logs.
I just don't know why my program could be performing perfectly with a console but doing nothing without one. Any ideas?
Gonna answer this myself. Make sure you don't print anything and also you redirect all stdout to a logger, file or whatever else instead of the console.
I was having a similar problem, but couldn't find any print/stdout statements going to console. I was using subprocess.Popen and redirecting stdout=subprocess.PIPE. I subsequently added stderr=subprocess.STDOUT and stdin=subprocess.PIPE and my program worked. This page (Python subprocess.call() fails when using pythonw.exe) on subprocess failures helped me get it working.

Flex trace() doesn't print

There's a lot of examples for ActionScript over the web using trace() to print results.
I'd tryied it using Flash Builder 4, but it don't print to the console. Where can I see the output?
Are you in debug mode ?
Put a breakpoint on the line where the trace() is wrote (ctrl+shift+b), debug and see if the trace is reached.
Are you printing the right string? try to use also a static text in front when doing trace like trace("Loading file: ", _myFile.url);
If you do not want to use Flash Player debugger, but you want to log messages without annoying Alert popups, you can easily
log to the Firebug console.
Are you sure that you are running the debug build and not the release build?
I had the same problem even with the debug player. I could step right past a trace call in the debugger with no console output. I was pulling my hair out checking mm.cfg, flex-config.xml, .actionScriptProperties and all the options I could find in FlexBuilder. Nothing worked...
..until I rebooted my machine (Windows XP 64-bit). No other changes necessary!

Getting a console or error log from a Cocotron app

Does anyone know how to get a console or error log in Cocotron? In XCode if you go to preferences and under debugging you can select start console on startup but when you run the cocotron outside of XCode (in windows) no console pops up. I would like to try and get the frame rate but I don't know how to output to the console. Thanks!
I spent ages trying to find this out.
Its very simple once you know it: just add -mconsole to the "Other linker flags" (where you have already added -mwindows)

Resources