- VERSION 1.09
- Vote::Count Logging Methods
- Logging Events
- Debug Flag
Sets a path and Naming pattern for writing logs with the WriteLogs method.
'LogTo' => '/logging_path/election_name'
LogTo will not create a new directory if the directory does not exist.
The default log location is '/tmp/votecount'.
Specifies a Path to the Log Files, unlike LogTo, LogPath will create the Path if it does not exist.
Sets the Base portion of the logfile names, but only if LogPath is specified. The default value is votecount.
Write the logs appending '.brief', '.full', and '.debug' for the three logs where brief is a summary written with the logt (log terse) method, the full transcript log written with logv, and finally the debug log written with logd. Each higher log level captures all events of the lower log levels.
When logging from your methods, use logt for events that produce a summary, use logv for events that should be in the full transcript such as round counts, and finally debug is for events that may be helpful in debugging but which should not be in the transcript. Events written to logt will be included in the verbose log and all events in the verbose log will be in the debug log.
When the debug flag is logx methods will also emit the event as a warning (STDERR). The Debug Flag defaults to off (0), but can be explicitly set via the new method of a Vote::Count object, or toggled by passing 0 or 1 via the Debug Method.
$Election->Debug(1); # turn debug on is( $Election->Action(), $expected, 'Thing Im debugging'); $Election->Debug(0); # turn debug off
John Karr (BRAINBUZ) email@example.com
Copyright 2019 by John Karr (BRAINBUZ) firstname.lastname@example.org.
This module is released under the GNU Public License Version 3. See license file for details. For more information on this license visit http://fsf.org.