Programming Guide



sm_log

Writes a message to an error log

int sm_log(char *msg);

msg
Message to be printed to the log.

Scope

Server

Description

sm_log writes messages to an error log file.

For COM and EJB applications, a file named server.log must exist in the component's application directory. When this file is created, in addition to the messages logged with this function, messages are automatically logged when service components are created or destroyed. All messages that would normally appear on the message line or message window are also logged.

During development you should always enable error logging by creating server.log. In production server.log should not be present as logging is a substantial load on the system.