comparison getan/main.py @ 483:d47e32e6b7e7

Logging can be activated and deactivated.
author Magnus Schieder <mschieder@intevation.de>
date Thu, 28 Jun 2018 12:01:16 +0200
parents 999a438474f2
children 463894654d77
comparison
equal deleted inserted replaced
482:999a438474f2 483:d47e32e6b7e7
51 help='[databasefile (default: %(default)s)]', 51 help='[databasefile (default: %(default)s)]',
52 default=DEFAULT_DATABASE) 52 default=DEFAULT_DATABASE)
53 parser.add_argument('--init-only', action='store_true', dest='initonly', 53 parser.add_argument('--init-only', action='store_true', dest='initonly',
54 help='create databasefile if necessary and exit') 54 help='create databasefile if necessary and exit')
55 parser.add_argument('-d', '--debug', action='store_const', dest='loglevel', 55 parser.add_argument('-d', '--debug', action='store_const', dest='loglevel',
56 default=logging.INFO, const=logging.DEBUG, 56 default=logging.NOTSET, const=logging.DEBUG,
57 help='set verbosity to debug') 57 help='Enable debung mode')
58 parser.add_argument('-l', '--logfile', dest='logfile', metavar='FILE', 58 parser.add_argument('-l', '--logfile', dest='logfile', metavar='FILE',
59 help='''write log information to FILE [default: 59 help='''write log information to FILE [default:
60 %(default)s]''', default='getan.log') 60 %(default)s]''', default='getan.log')
61 61
62 args = parser.parse_args() 62 args = parser.parse_args()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)