tags:

views:

75

answers:

2

When i start yaws (yaws -i --conf config/yaws.conf) i get this line in the output:

Running with debug checks turned on (slower server)

It depends on the "-i" option? Or where did i turned on debug checks? No mention of debug in the config file...

thx edoardo

+1  A: 

This will be because your flags setting in the global config has the debug bit (2) set. If GC_DEBUG is set in the global configuration this feature will be enabled.

These are the flags:

-define(GC_TTY_TRACE,                        1).
-define(GC_DEBUG,                            2).
-define(GC_AUTH_LOG,                         4).
-define(GC_COPY_ERRLOG,                      8).
-define(GC_BACKWARDS_COMPAT_PARSE,          16).
-define(GC_LOG_RESOLVE_HOSTNAME,            32).
-define(GC_FAIL_ON_BIND_ERR,                64).
-define(GC_PICK_FIRST_VIRTHOST_ON_NOMATCH, 128).
-define(GC_USE_FDSRV,                      256).
-define(GC_USE_OLD_SSL,                    512).

I think that in the yaws.config file this is actually un-set by setting the debug = false flag in the global part.

Updated - the debug parameter is part of the env settings of the app in the yaws.app file, so adding something like

-yaws debug false

to the real command line should work

Alan Moore
hi, Alan and thx for your reply.When I saw it I said: "Obvious, why I've not tried..." but then I tried and got this reply from yaws: "Yaws: Bad conf: "Unexpected tokens \"debug\" at line 4". So what is true for the other flags seems not to apply to 'debug'.thx again.
Edoardo Batini
Sorry - have a look at your yaws.app file (if you're running yaws standalone) - it'll be in erlx.y.z/lib/yaws-a.b/ebin/yaws.app. The mysterious debug parameter is part of the env settings in that file, and as it is an application parameter you should also be able to control it on the command line.
Alan Moore
( I of course assumed it would map in the GC record but a little bit further down the code it was obvious it was coming from the environment and not the config...!)
Alan Moore
thx again alan, that solved my problem :)
Edoardo Batini
A: 

In recent versions of yaws (1.85 and later) you can simply pass the --nodebug option on the command line:

yaws -i --nodebug
Steve Vinoski