[ Back to main index ] | [ Show all FAQs on a single page ]

Programming and debugging Roxen & ChiliMoon

Extend and debug your Roxen and ChiliMoon webserver

Where can I find error and debug messages?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-11-21 by Michael Stenitzer

There are as usual several ways to get your debug and error messages:

  • the debug-log in your logs directory show the last 5 debug logs named default.1 (Roxen) etc or configurations.1 etc. (ChiliMoon)
  • some errors are listed in the administration interface (Globals -> Events, Sites -> <name> -> Status or also in the modules Status tab).

You can controll the logging and visibilty of error information on your web page by several settings:

  • to show details about internal server errors can be enabled at your site's Port tab
  • to show errors on module level you can adjust the settings in some modules (mostly the RXML2 parser to show RXML errors)
  • you can use the <debug/> tag to toggle the visibility of RXML errors

Note: The debug logs (including backtraces of internal errors and - if set so in the configuration - RXML errors) are rotated in ../logs/debug/default.1 - ../logs/debug/default.5. So after one restart you’ll find debug information from the last run in ../logs/debug/default.2.

Applies to: Roxen , ChiliMoon

How can I get more information about what is cached or not?

Posted at 2004-11-15 by Michael Stenitzer, Last updated at 2004-11-21 by Michael Stenitzer

You can start Roxen with the flags -DPC_DEBUG and -DSBNOTIFY_DEBUG to get more information in the debug log about what the persistent cache and notification systems are doing.

You can also find some general cache information in the admin interface’s Tasks -> Status -> Cache status tab.

Applies to: Roxen , ChiliMoon

How can I write my own Roxen / ChiliMoon modules?

Posted at 2004-11-17 by Michael Stenitzer

There is some documentation cluttered all over the place:

  • Look at the docs “System Developer Manual Pike” and “System Developer Manual Java“
  • There are few articles concerning this topic at community.roxen.com/articles (be careful as they might not represent the current API to full extent)
  • Pick up one of the modules shipped with Roxen / ChiliMoon most similar to your ideas and learn from those
  • There is also quite a bit of API documentation in the comments in of server/pike_modules/RXML.pmod/module.pmod. Unfortunately that's not very easy to understand, since it only got all the details, but not the "big picture"

Applies to: Roxen , ChiliMoon

[show comments]

How can I access a variable in modules?

Posted at 2004-11-17 by Michael Stenitzer

This is the way to acces variables in the "form" scope:

 id->variables->var1 

All other scopes, especially the "var" scope, must be accessed through

 RXML.get_context()->user_get_var("scope.myvar"); 
 RXML.get_context()->user_set_var("scope.myvar","value"); 

or

 RXML.get_context()->user_get_var("myvar", "scope"); 
 RXML.get_context()->user_set_var("var","value", "scope"); 

Note: You can also use this method in inline Pike, although it is easier to use the form scope.context in the Pike processing instruchtion <?pike ?> (see Roxen Scripting FAQs)

Applies to: Roxen , ChiliMoon

I changed Pike code in a module. Why does it have no effect at the server's behaviour?

Posted at 2004-11-17 by Michael Stenitzer

Reload your module (in the module's status tab) in the administration interface or flush the cache (Tasks-> Maintenance-> Flush chaches).

Applies to: Roxen , ChiliMoon

[show comments]

I have found a bug. How can I report it?

Posted at 2004-11-17 by Michael Stenitzer

For Roxen: Use Crunch, a kind of bugzilla at community.roxen.com/crunch/ . You have to register at Roxen Community community.roxen.com/register/

For ChiliMoon: Currently you have to use bugzilla at bugzilla.lysator.liu.se/

Applies to: Roxen , ChiliMoon

How can I debug Roxen?

Posted at 2004-11-17 by Michael Stenitzer

Use debug options provided by the start programme.

 ./start -help 

gives you more information this.

Another way to debug Roxen's / ChiliMoon's modules or core is to insert something like this in the code:

 werror("report a: %O, b: %O\n", a, b); 

The result will be printed into the debug files. (logs/debug/default.1). Read more at community.roxen.com/articles/004_errors/

You can also write from RXML directly into the debug log

 <debug werror="This is printed in the debug log"/> 

Applies to: Roxen , ChiliMoon

[ Back to main index ] | [ Show all FAQs on a single page ]