02-05-2014 01:11 PM
Where are the configuration options documented for the niembeddedws.conf file? Specifically, I want to turn on the web server's logging and specify the log file.
Here is my niembeddedws.conf file. The three commented out fields are my best guesses...but they did not work.
# Web server configuration file.
# Generated by LabVIEW 13.0f2
# 2/5/2014 10:44:00 AM
#
# Global Directives
#
#ErrorLog "$LVSERVER_ROOT/logs/error.log"
#AccessLog "$LVSERVER_ROOT/logs/access.log"
#LogLevel 3
NI.AddLVRouteVars
TypesConfig "$LVSERVER_ROOT/mime.types"
LimitWorkers 10
LimitRequestBody 50000000
LoadModulePath $LVSERVER_ROOT/modules;$LVSERVER_ROOT/..
LoadModule niSessionManagerModule mod_nisessmgr
LoadModule niAuthModule mod_niauth
LoadModule EspModule mod_niesp
LoadModule WSRuntime ws_runtime
Listen 8099
#
# Directives that apply to the default server
#
NI.ServerName "LV Embedded Web Server"
DocumentRoot "$LVSERVER_ROOT/ws_www"
InactivityTimeout 60
SetConnector netConnector
AddHandler niAuthHandler
AddHandler WSRuntime
AddHandler fileHandler ""
AddOutputFilter chunkFilter
LimitRequestForm 50000000
NI.WSRuntime.Configuration embedded "$LVSERVER_ROOT/services"
NI.WSRuntime.LoadWebService driver_interface.lvws
02-05-2014 03:47 PM
Hi Darshan,
To turn on error loggin you will have to remove the # infront of the fist line in your conf file and add ",level=2". Below is what my line looks like:
ErrorLog "$LVSERVER_ROOT/logs/error.log", level=2
This will create a log file next to your web server called error.log. The log will give you information basic log information, mostly set up and some warnings. If you would like a higher level of logging you can increase the level up to 9 and that will give you a lot of information. I recomend staying around the 2 and 3 area or else it is hard to parse any useful information out of the log.
Hope this helps!
KiraT
02-05-2014 04:05 PM - edited 02-05-2014 04:10 PM
Thanks Kira for your help here. I was running into a problem with the previous settings, which is why I commented them out guessing that they were not right. Since you confirmed that these are indeed the correct settings, I experimented some more. These settings work correctly:
ErrorLog "error.log"
AccessLog "access.log"
I will see an error.log and access.log file created in the current working directory (which is the same directory from which the .exe launched).
The "LogLevel" is an unknown directive. Also the "level=2" does not work (raises an error in the error.log).
Is there a place where all these niembeddedws.conf settings are documented?
02-19-2014 04:01 PM
You can find more information on turning on Web Server error logging in this KnowledgeBase article. Were you able to get the error logging working with your web service?