Hi Mike,
I hope that I understood you correctly. Please correct me if my replies are incorrect.
Problem 1: No real log. I'm assuming you mean you need to print some debug messages from php?
I don't know if you tried getting xdebug to work, but that + an IDE like NetBeans is useful for debugging with breakpoints.
If you want to/are fine with just printing stuff, using error_log() will print to the server's error log (default is lsws/logs/error.log).
You can do something like:
error_log('Hello World!'); // prints Hello World! to error log.
error_log('My class innards ' . print_r($myClass, true)); // prints members of my class to the error log.
In php, global variables like $_SERVER, $_REQUEST, $_GET, $_POST, $_COOKIE are available. These are all arrays, so you can use the print_r technique mentioned earlier to print out the input.
Problem 2/main point: You are trying to implement something that utilizes libsass for all of your requests to do some parsing.
We have a beta module system available in OLS. It currently works, but is untested. It is also not finalized, so some things may change (nothing crazy, unless it's a major change to the server).
The module system provides a place for users to hook into the server processing, and if I understand you correctly, that's exactly what you're looking for.
In the downloaded directory (the directory you get after untarring the package), there should be a subdirectory addon. In addon/example, there should be a ccc.sh and a list of .c files.
ccc.sh is the compiling script. This is used to create the .so file to add to your module list.
The .c files are sample modules that you can look through to get an idea of what to do (we don't have a guide out yet).
Also in the downloaded directory, there is a subdirectory include. In here, you will find ls.h, lsdef.h, and a lsr subdirectory.
ls.h is the file with most of the constants and functions for you to use to hook into the request processing stages.
lsdef.h has some more defines, small file, but if you were interested, this is here.
lsr/ contains the litespeed runtime class prototypes. These are here for you in case you want to use some specialty classes.
After creating your module and compiling it with ccc.sh, copy the .so to your installation directory, into lsws/modules/.
Once copied, you will need to add the module via the web admin. It must be added at the server level. You may individualize the enable/disable at the vhost/context levels, but it must be added at the server level at a minimum.
Hope this helps, if I didn't answer your questions let me know!
Cheers,
Kevin