verbose is False by default
we can launch gajim with -v to enable verbose
This commit is contained in:
parent
873ac33a5e
commit
8a974c8af6
4 changed files with 17 additions and 13 deletions
|
@ -35,7 +35,7 @@ class Config:
|
||||||
|
|
||||||
__options = {
|
__options = {
|
||||||
# name: [ type, value ]
|
# name: [ type, value ]
|
||||||
'verbose': [ opt_bool, True ],
|
'verbose': [ opt_bool, False ],
|
||||||
'delauth': [ opt_bool, True ],
|
'delauth': [ opt_bool, True ],
|
||||||
'delroster': [ opt_bool, True ],
|
'delroster': [ opt_bool, True ],
|
||||||
'alwaysauth': [ opt_bool, False ],
|
'alwaysauth': [ opt_bool, False ],
|
||||||
|
|
|
@ -534,7 +534,7 @@ class Connection:
|
||||||
'proxypass')
|
'proxypass')
|
||||||
else:
|
else:
|
||||||
proxy = None
|
proxy = None
|
||||||
if gajim.config.get('verbose'):
|
if gajim.verbose:
|
||||||
con = common.xmpp.Client(hostname)
|
con = common.xmpp.Client(hostname)
|
||||||
else:
|
else:
|
||||||
con = common.xmpp.Client(hostname, debug = [])
|
con = common.xmpp.Client(hostname, debug = [])
|
||||||
|
|
|
@ -24,6 +24,7 @@ import common.logger
|
||||||
version = '0.7.1'
|
version = '0.7.1'
|
||||||
config = common.config.Config()
|
config = common.config.Config()
|
||||||
connections = {}
|
connections = {}
|
||||||
|
verbose = config.get('verbose')
|
||||||
|
|
||||||
h = logging.StreamHandler()
|
h = logging.StreamHandler()
|
||||||
f = logging.Formatter('%(asctime)s %(name)s: %(message)s', '%d %b %Y %H:%M:%S')
|
f = logging.Formatter('%(asctime)s %(name)s: %(message)s', '%d %b %Y %H:%M:%S')
|
||||||
|
|
|
@ -49,7 +49,8 @@ from common import optparser
|
||||||
|
|
||||||
profile = ''
|
profile = ''
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], 'hp:', [ 'help', 'profile=' ])
|
opts, args = getopt.getopt(sys.argv[1:], 'hvp:', [ 'help', 'verbose',
|
||||||
|
'profile='])
|
||||||
except getopt.error, msg:
|
except getopt.error, msg:
|
||||||
print msg
|
print msg
|
||||||
print 'for help use --help'
|
print 'for help use --help'
|
||||||
|
@ -58,6 +59,8 @@ for o, a in opts:
|
||||||
if o in ('-h', '--help'):
|
if o in ('-h', '--help'):
|
||||||
print 'gajim [--help] [--profile name]'
|
print 'gajim [--help] [--profile name]'
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
elif o in ('-v', '--verbose'):
|
||||||
|
gajim.verbose = True
|
||||||
elif o in ('-p', '--profile'): # gajim --profile name
|
elif o in ('-p', '--profile'): # gajim --profile name
|
||||||
profile = a
|
profile = a
|
||||||
|
|
||||||
|
@ -706,7 +709,7 @@ class Interface:
|
||||||
}
|
}
|
||||||
parser.read()
|
parser.read()
|
||||||
|
|
||||||
if gajim.config.get('verbose'):
|
if gajim.verbose:
|
||||||
gajim.log.setLevel(gajim.logging.DEBUG)
|
gajim.log.setLevel(gajim.logging.DEBUG)
|
||||||
else:
|
else:
|
||||||
gajim.log.setLevel(None)
|
gajim.log.setLevel(None)
|
||||||
|
|
Loading…
Add table
Reference in a new issue