Changeset ffd078a


Ignore:
Timestamp:
2009-08-18T11:33:57Z (11 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
c99bb05
Parents:
61580d7
git-author:
Leho Kraav <leho@…> (18-08-09 11:33:57)
git-committer:
Miklos Vajna <vmiklos@…> (18-08-09 11:33:57)
Message:

dprint() now timestamps debug messages

it's good to know when exactly a problem occurs.

[ mv: minor rewording of the commit message and filter pointless mode
change ]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skyped.py

    r61580d7 rffd078a  
    140140
    141141def dprint(msg):
     142        from time import strftime
    142143        global options
    143144
     145        now = strftime("%Y-%m-%d %H:%M:%S")
     146
    144147        if options.debug:
    145                 print msg
     148                print now + ": " + msg
    146149        if options.log:
    147150                sock = open(options.log, "a")
    148                 sock.write("%s\n" % msg)
     151                sock.write("%s: %s\n" % now, msg)
    149152                sock.close()
    150153
Note: See TracChangeset for help on using the changeset viewer.