next up previous
Next: SLS BOOSTER COMMISSIONING Up: CORBA OBJECTS FOR SLS Previous: The CORBA Oracle Interface

The CORBA Message Logger Interface

All client and server processes are able to report messages and alarms to a dedicated CORBA message server. The server employs the UNIX syslog message logging facility incorporating a variety of priority levels, as indicated by the IDL specification shown in Table 5. Syslog entries are further transposed into SQL INSERT operations for immediate entry into the database via the Oracle SQL*Plus client. Messages entered follow a standard format, as illustrated in Table 6, and are viewed either through a Tcl/Tk based browser polling the log files or the native database browser which retrieves data from the corresponding database table.
 
Table 5: The IDL for the message server.
module MessageLogger {
enum PriorityType{ emerg, alert, crit, err,
warning, notice, info, debug };
interface Sys {
short SystemLog(in string IdStr, in PriorityType

priority, in string LogMsg) };

};
 
 


 
Table 6: C++ code listing for error message logging.
$\backslash\backslash$ char *IdStr="processname@hostname[pid]"
char *IdStr=Identifier(argv[0]);
char LogMsg[MAXSIZE];

$\backslash\backslash$ Prepare Error Message

sprintf(LogMsg,"%s %d %s",__METHOD__,__LINE__,
"Invalid BPM data");
$\backslash\backslash$ Send Error Message with high severity "err"
LogRef->SystemLog(IdStr,(PriorityType) err,LogMsg);

 


next up previous
Next: SLS BOOSTER COMMISSIONING Up: CORBA OBJECTS FOR SLS Previous: The CORBA Oracle Interface
Jan Chrin
2000-11-13