This software records messages using the httpd access and error log formats.
One of the key features of Log::Common is its ability to lock the log file while it is being written to. This ensures that there is no data corruption if multiple processes attempt to write to the same file simultaneously. Additionally, both methods support an optional "exit" parameter that will cause the program to terminate if specified.
When the environmental variable GATEWAY_INTERFACE isn't defined, error messages are automatically sent to STDERR. However, this behavior can be overridden if desired. This feature allows developers to easily send messages to both end-users and a system log file at the same time.
Error log file entries are written with a UTC timestamp, in accordance with common HTTP server usage.
To use Log::Common in your Perl program, you simply need to add the "use Log::Common" statement. You can then create a new instance of the class, specifying the access and error log file locations, as well as any desired options (e.g. whether or not to send messages to STDERR). From there, you can easily write messages to the log files using the "error" and "access" methods.
Overall, Log::Common offers a straightforward solution for logging in Perl applications, particularly those designed to run on httpd servers.
Version 1.00: N/A