|
|
| version 1.7, 2010/12/16 14:24:25 | version 1.8, 2010/12/16 21:38:46 |
|---|---|
| Line 105 while( 1 ) { sleep 1; } | Line 105 while( 1 ) { sleep 1; } |
| ## Sub-routines begin here | ## Sub-routines begin here |
| ## | ## |
| ############################################################################### | ############################################################################### |
| ############################################################################### | |
| ############################################################################### | |
| ## | |
| ## &logmsg( "string" ); | |
| ## | |
| ## This takes a string and prepends the process name, ID and timestamp | |
| ## to the message. It then displays it to STDOUT and logs it if enabled. | |
| ## | |
| ############################################################################### | |
| sub logmsg | sub logmsg |
| { | { |
| my $message = "$0 $$ " . scalar( localtime( ) ) . ":@_\n"; | my $message = "$0 $$ " . scalar( localtime( ) ) . ":@_\n"; |
| Line 116 sub logmsg | Line 124 sub logmsg |
| ############################################################################### | ############################################################################### |
| ## | |
| ## &display_config_and_options( %hash ); | |
| ## | |
| ## This will display via Data::Dumper a hash that is passed to it. | |
| ## If verbose is enabled it will got to STDOUT and if logging is enabled | |
| ## it will be logged. | |
| ## | |
| ## This is called only once during startup. | |
| ## | |
| ############################################################################### | ############################################################################### |
| sub display_config_and_options | sub display_config_and_options |
| { | { |