Fix Dates. Improve CSF integration. Fix Typos

This commit is contained in:
Michael Ramsey
2019-10-08 13:17:33 -04:00
parent 99c0c5a46b
commit 25848342f5
41 changed files with 379 additions and 108 deletions

8
plogical/backupSchedule.py Executable file → Normal file
View File

@@ -24,8 +24,8 @@ class backupSchedule:
def remoteBackupLogging(fileName, message):
try:
file = open(fileName,'a')
file.writelines("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n")
print ("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] "+ message + "\n")
file.writelines("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n")
print ("[" + time.strftime("%m.%d.%Y_%H-%M-%S") + "] "+ message + "\n")
file.close()
except IOError,msg:
return "Can not write to error file."
@@ -192,10 +192,10 @@ class backupSchedule:
try:
destinations = backupUtilities.destinationsPath
backupLogPath = "/usr/local/lscp/logs/backup_log."+time.strftime("%I-%M-%S-%a-%b-%Y")
backupLogPath = "/usr/local/lscp/logs/backup_log."+time.strftime("%m.%d.%Y_%H-%M-%S")
backupSchedule.remoteBackupLogging(backupLogPath,"#################################################")
backupSchedule.remoteBackupLogging(backupLogPath," Backup log for: " +time.strftime("%I-%M-%S-%a-%b-%Y"))
backupSchedule.remoteBackupLogging(backupLogPath," Backup log for: " +time.strftime("%m.%d.%Y_%H-%M-%S"))
backupSchedule.remoteBackupLogging(backupLogPath,"#################################################\n")
backupSchedule.remoteBackupLogging(backupLogPath, "")