Skip to content

Commit

Permalink
enable debug based on loglvl
Browse files Browse the repository at this point in the history
  • Loading branch information
andylytical committed Jan 11, 2024
1 parent 5954309 commit 37368a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions jiracmdline/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@

logfmt = '%(levelname)s:%(funcName)s[%(lineno)d] %(message)s'
loglvl = logging.INFO
loglvl = logging.DEBUG
# loglvl = logging.DEBUG
logging.basicConfig( level=loglvl, format=logfmt )
logging.getLogger( 'libjira' ).setLevel( loglvl )
logging.getLogger( 'jira.JIRA' ).setLevel( loglvl )

app = flask.Flask( __name__ )
app.secret_key = secrets.token_hex()
# Tell flask_login to put "next" in the session instead of GET args
if loglvl == logging.DEBUG:
app.debug = True
# Tell flask_login to put "next" in the session, instead of, in the args to GET
app.config['USE_SESSION_FOR_NEXT'] = True
login_manager = flask_login.LoginManager( app=app )
login_manager.login_view = "login"
Expand Down Expand Up @@ -277,4 +279,4 @@ def do_summary():


if __name__ == '__main__':
app.run( debug=True )
app.run()

0 comments on commit 37368a1

Please sign in to comment.