GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 625544...e33679 )
by Alex
02:01
created

setup_logging()   A

Complexity

Conditions 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
1
import os
2
import logging
3
4
from sugarloaf import create_app
5
6
env = os.environ.get('SUGARLOAF_ENV', 'dev')
7
app = create_app('sugarloaf.settings.%sConfig' % env.capitalize())
8
9
10
@app.before_first_request
11
def setup_logging():
12
    if not app.debug:
13
        app.logger.addHandler(logging.StreamHandler())
14
        app.logger.setLevel(logging.INFO)
15
16
17
if __name__ == '__main__':
18
    app.run()