Changeset bcdc24b


Ignore:
Timestamp:
2009-02-18T00:30:13Z (12 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
8ee6def
Parents:
3512d0b
Message:

skyped: add logfile option

using this option messages are not lost when not running in foreground
mode

Location:
skype
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skype/skyped.py

    r3512d0b rbcdc24b  
    33#   skyped.py
    44
    5 #   Copyright (c) 2007, 2008 by Miklos Vajna <vmiklos@frugalware.org>
     5#   Copyright (c) 2007, 2008, 2009 by Miklos Vajna <vmiklos@frugalware.org>
    66#
    77#   This program is free software; you can redistribute it and/or modify
     
    144144        if options.debug:
    145145                print msg
     146        if options.log:
     147                sock = open(options.log, "a")
     148                sock.write("%s\n" % msg)
     149                sock.close()
    146150
    147151class SkypeApi:
     
    207211                self.help = False
    208212                self.host = "0.0.0.0"
     213                self.log = None
    209214                self.port = None
    210215                self.version = False
     
    226231        -h      --help          this help
    227232        -H      --host          set the tcp host (default: %s)
     233        -l      --log           set the log file in background mode (default: none)
    228234        -n      --nofork        don't run as daemon in the background
    229235        -p      --port          set the tcp port (default: %s)
     
    234240        options = Options()
    235241        try:
    236                 opts, args = getopt.getopt(sys.argv[1:], "c:dhH:np:v", ["config=", "daemon", "help", "host=", "nofork", "port=", "version"])
     242                opts, args = getopt.getopt(sys.argv[1:], "c:dhH:l:np:v", ["config=", "daemon", "help", "host=", "log=", "nofork", "port=", "version"])
    237243        except getopt.GetoptError:
    238244                options.usage(1)
     
    246252                elif opt in ("-H", "--host"):
    247253                        options.host = arg
     254                elif opt in ("-l", "--log"):
     255                        options.log = arg
    248256                elif opt in ("-n", "--nofork"):
    249257                        options.daemon = False
  • skype/t/livetest-bitlbee.sh

    r3512d0b rbcdc24b  
    3333
    3434# Run skyped
    35 python ../skyped.py -c skyped.conf > skypedtest.pid
     35python ../skyped.py -c skyped.conf -l skypedtest.log > skypedtest.pid
    3636sleep 2
    3737
Note: See TracChangeset for help on using the changeset viewer.