When the Rocrail server is running as service or daemon it needs some more trace facility beyond the standards to aid the administrator.
These options are not changeable by dialog and are for experts only.
XML description: http://www.rocrail.net/doc/rocrail-wrappers/wrapper-en.html#trace
These attributes can be used in the <trace…/> node of the rocrail.ini.
|protpath||.||Protocol path; Where to write the trace files. (Use relative only if using http service.) Path is relative to pwd¹!|
|unique||false||Create a unique trace filename at startup.|
|size||100||Filesize of trace files in KB.|
|nr||10||Number of continuous trace files. In case of 0 or 1: All traces are written in one file disregarding filesize.|
|exceptionfile||false||Create extra file for exceptions.|
|invoke||./xmail.pl||External program or script to invoke on exception file creation.|
|invokeasync||false||The invokation will take place in a separate thread.|
|dumpsize||128||Max. byte dump size.|
¹) pwd = process working directory
To prevent the overwriting of existing traces, in case of a not easy to catch problem, this flag will make sure that trace files always get a unique file name.
The invoke option, in conjunction with exceptionfile, provides a mechanism to notify someone or something of the first exception written in the newly created exception file.
After reviewing this exception file it should be moved or deleted to get a new triggered event when an exception is raised. (If wanted.)
The script or program to be invoked is user defined, but if the external program could block the Rocrail server it is recommended to set the invokeasync to true to avoid it.
The example Perl script will send an email in case of the exception file creation:
#!/usr/bin/perl require 5.000; $mailaddr = $ARGV; open(SENDMAIL, "| /usr/sbin/sendmail -t -n") || die "Unable to open sendmail"; print SENDMAIL "From: Rocrail\n"; print SENDMAIL "To: $mailaddr\n"; print SENDMAIL "Reply-To: Rocrail\n"; print SENDMAIL "Subject: Exception file created.\n"; print SENDMAIL "This email is sended to notify you because an exception file is created.\n"; close(SENDMAIL);
TRCLEVEL_EXCEPTION=0x0001 ,TRCLEVEL_INFO =0x0002 ,TRCLEVEL_WARNING =0x0004 ,TRCLEVEL_DEBUG =0x0008, TRCLEVEL_BYTE =0x0010 ,TRCLEVEL_METHOD =0x0020 ,TRCLEVEL_MEMORY =0x0040 ,TRCLEVEL_PARAM =0x0080, TRCLEVEL_PROTOCOL =0x0100 ,TRCLEVEL_ERROR =0x0200 ,TRCLEVEL_PARSE =0x0400 ,TRCLEVEL_WRAPPER =0x0800, TRCLEVEL_USER1 =0x1000 ,TRCLEVEL_USER2 =0x2000 ,TRCLEVEL_MONITOR =0x4000 ,TRCLEVEL_XMLH =0x8000, TRCLEVEL_USER =0xF000 ,TRCLEVEL_CALC =0x10000 ,TRCLEVEL_STATUS =0x20000 ,TRCLEVEL_XMLSCRIPT=0x40000, TRCLEVEL_FIND =0x80000,TRCLEVEL_CLNTCON=0x100000,TRCLEVEL_ANALYSER=0x200000,TRCLEVEL_ALL =0xFFFFFF