So for reference, the log formatting looks like:
<num>|<module>|<level>:message

The log settings are in the form:
<module>:<facility>:<level>

module is the name of a component or other module.  Something like "nox"
or "pyrt" or "pyswitch", for example.  "ANY" is a special string which
matches every module.

facility is the logging facility.  The ones currently in NOX are
"syslog" and "console".  Again, "ANY" is a special string which matches
all facilities.

level is the minimum log level that you want logged.  From most to least
significant, these are: EMER, ERR, WARN, INFO, DBG.

You can include multiple of these.  For example:
--verbose=ANY:ANY:DBG --verbose=pyswitch:ANY:EMER

.. should turn on debug level logging for everything except pyswitch,
which will only log emergency info.

-v (or --verbose) is basically a shortcut for ANY:ANY:DBG in current
versions of NOX, I believe.  In future versions, I think it will be more
like ANY:ANY:INFO.  Including it twice (-v -v) will give the older
ANY:ANY:DBG behavior.


At the moment, the only way to specify this stuff is through the
commandline.  The code to let you specify it in nox.json has been
written, but I don't think I've pushed it yet.  It'll show up in destiny
in the next couple weeks.  Basically, it adds a "logging" key which
contains an array of maps which contain combinations of the keys
"module", "facility", and "level".  So for example, if you wanted to do
the same as the commandline above, your nox.json might look like:
{
 "nox" : {
  "logging" : [
   { "level" : "DBG" },
   { "module" : "pyswitch", "level" : "EMER" }
  ]
  ... more stuff ...
 }
}


I don't know if you were interested in OTHER stuff in the main config
file too.  I think the only other thing in there is the event ordering
stuff, which is described on the wiki, I believe.


Hope that helps.

-- Murphy

On Wed, 2011-03-23 at 14:33 -0400, John Meylor wrote:
> I'm looking for information on setting configuration files and verbosity 
> levels for nox. The flag options are mentioned in the help menu, but I can't 
> find any further information on the required JSON syntax and flags.
> 
> Thanks
> John
> 
> ./nox_core --help
> Other options:
>       -c, --conf=FILE         set configuration file
>       -n, --info=FILE         set controller info file
>       -v, --verbose           set maximum verbosity level (for console)
>       -v, --verbose=CONFIG    configure verbosity
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev


_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to