Chapter 5 C Routines Reference
Write a message to the server's log file.
#include <jagpublic.h>
JagStatus JagLog(
JagBoolean use_date,
SQLPOINTER logmsg)
use_date
Pass as JAG_TRUE to indicate that the message should be preceded by a timestamp in the log; pass as JAG_FALSE to log the message without a timestamp.
logmsg
A null-terminated string containing the message to be logged. The message must include a newline at the end.
JagLog writes a message to the server's log file.
By convention, errors that occur on the server are written to the log. C or C++ components should use JagLog to record error messages in the log rather than printing to the console.
You can call JagSendMsg to send error messages to the client. When a method invocation fails you should log any details that will help debug the cause of failure, then send a descriptive error to the client.
The default log file name is srv.log; you can change it by setting the corresponding field in the Debug/Trace tab of the server's property sheet. For instructions on accessing the property sheet, see "Server Configuration" in the Jaguar CTS System Administration Guide.
"Handle Errors in Your C Component" in the Jaguar CTS Programmer's Guide.
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |