On Sat, Nov 7, 2009 at 11:21 PM, Eric Liang <eric.l.2046@gmail.com> wrote:
Steve Vinoski wrote:


On Sat, Nov 7, 2009 at 11:34 AM, Eric Liang <eric.l.2046@gmail.com> wrote:
Hi all,
I'm trying some web frameworks, Erlyweb, Erlang-web and Nitrogen till
now.  Do jobs like this are usually not in smooth waters, and then debug
is necessary. But this time, I found couldn't get the yaws' debug info.

I've tried run yaws by --debug flag, and even modify the yaws.app file(
set the debug env variable), both did not work. :( .  The log files in
/var/log/yaws are still *.access/auth.log/report.log/trace.http, no
other debug output file. I check the content of these files, it looks
like there are no debug info in them. So my question is: how can I get
the yaws' debug output? Did I missed something?

How about

yaws --interactive --tracetraf --traceout --tracehttp --debug

This runs yaws interactively and shows all kinds of debug and trace info right on stdout.
Thanks Steve.

Actually, I have tried this command,  the debug output is only some PROGRESS REPORTs, but I need more about the program.  The specific case is:
some of my yaws configurations do not work, so I decide to get in yaws to see what happened. The source of yaws looks like use a macro ?Debug which call the functions yaws_debug:assert ->yaws_debug:fail ->io:format, so I guess it will print these information to some place like stdout. but I can't get them from file( no log) or interactive output( the command you suggested ) ? 

Those macros have to be compiled in. Build your code like this:

make TYPE=debug

Install the result and run with the command line I gave you above.

If you keep having problems, don't hesitate to ask for help with your code on this list.

--steve