add logging to reboot.py
authorStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 4 Jun 2010 21:56:10 +0000 (21:56 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 4 Jun 2010 21:56:10 +0000 (21:56 +0000)
commands/reboot.py

index 92e0f69..d5ce318 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/python
 
 from monitor.reboot import *
 #!/usr/bin/python
 
 from monitor.reboot import *
+import time
 
 def main():
        logger.setLevel(logging.DEBUG)
 
 def main():
        logger.setLevel(logging.DEBUG)
@@ -33,5 +34,5 @@ def main():
 if __name__ == '__main__':
        main()
        f = open("/tmp/rebootlog", 'a')
 if __name__ == '__main__':
        main()
        f = open("/tmp/rebootlog", 'a')
-       f.write("reboot %s\n" % sys.argv)
+       f.write("reboot %s %s\n" % (time.time(), " ".join(sys.argv[1:])))
        f.close()
        f.close()