Subversion Repositories camp_sysinfo_client_3

Rev

Rev 135 | Rev 138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 135 Rev 136
Line 210... Line 210...
210
;
210
;
211
 
211
 
212
my $DATA_VERSION = '3.0.0'; # used in sending the data file. sets version of XML/YAML data file
212
my $DATA_VERSION = '3.0.0'; # used in sending the data file. sets version of XML/YAML data file
213
 
213
 
214
 
214
 
-
 
215
#######################################################
-
 
216
#
-
 
217
# timeStamp
-
 
218
#
-
 
219
# return current system date as YYYY-MM-DD HH:MM:SS
-
 
220
#
-
 
221
#######################################################
-
 
222
sub timeStamp {
-
 
223
   my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
-
 
224
   return sprintf "%4d-%02d-%02d %02d:%02d:%02d\n",$year+1900,$mon+1,$mday,$hour,$min,$sec;
-
 
225
}
-
 
226
   
-
 
227
 
-
 
228
 
-
 
229
 
215
# function to simply things
230
# function to simply things
216
# first parameter is the priority, if <= $logDef->{'log level'} will print
231
# first parameter is the priority, if <= $logDef->{'log level'} will print
217
# all subsequent parameters assumed to be strings to sent to the log
232
# all subsequent parameters assumed to be strings to sent to the log
218
# returns 0 on failure
233
# returns 0 on failure
219
#         1 on success
234
#         1 on success