Log
The Log function writes an entry or entries to the specified server log.
Syntax
Copy Code | |
---|---|
void Log( string name, bool detail, string string1, string string2, ..., string stringN ); |
Parameters
name
The logical name of the log. Note that this "name" has no relationship to the name of the physical file used to store the logs. The set of possible logical names comprises the following values.
Value |
Description |
---|---|
"Event" |
The supplied messages are recorded as warnings in the event log. |
"Error" |
The supplied message are recorded as errors in the event log. |
"Debugr" |
The supplied messages are recorded in the debug log. |
detail
If this parameter is false, the application URI, the current date and time, and the following message headers will be recorded:
-
Method
-
Request-Uri
-
From
-
To
If this parameter is true, the entire message (except for the Content value) will be logged.
string1
Specifies the first message to write to the log, on a separate line.
string2
Specifies the second message to write to the log, on a separate line.
...
stringN
Specifies the last message to write to the log, on a separate line.
Remarks
Logs of type "Event" and "Error" can be found in the server event log.
Logs of type "Debugr" are viewed using the APILogger.exe utility provided with Microsoft Lync Server 2010. To effectively debug your script, regular calls to Log with debug entries should be made.
The default log type is "Debugr" if name is not one of the above three types.