Call
the log() function of the IFmsServerContext class
in a plug‑in to send custom messages to log files from the Authorization
and File plug-ins. Plug‑in log files are located in the RootInstall/logs
directory and are named fileio.NN.log and authMessage.NN.log, by
default.
Note: In addition to client connections, the Authorization
plug‑in logs the connections made when a server-side Stream.play() method
is called. These connections are distinguished by the IP address
127.0.0.1 in the access.log files and in the authEvent.log files.
The log() function has an argument that specifies
whether the log message should also be logged to the system log
(Windows Event Viewer or Linux syslog). The default value is false.
Excessive logging to the system log can cause performance problems.
Edit the Logging section of
the Server.xml configuration file (located in RootInstall/conf)
to enable or disable each log file. Edit the Logger.xml file (located
in RootInstall/conf) to add or change the configuration information,
including the location and name of the log files. For detailed information,
see the comments in the XML files.
The Access plug-in is hosted by a process that closes standard
out and standard error, therefore plug-in developers cannot rely
on these to log messages. Instead, for the Access plug-in, log messages
explicitly to a file. The sample Access plug-in demonstrates a workaround.
Search for the line FILE* logFile = fopen("SampleAdaptor.log", "a"); in
the RootInstall/samples/plugins/access/adaptor.cpp file.