Skip to content

Commit

Permalink
Move logging.basicConfig() from api to cli
Browse files Browse the repository at this point in the history
Logging should be set in the cli rather than the api to
avoid overwritting logging settings set by the user.

Related to GitHub issue #58
  • Loading branch information
awgreene committed Mar 12, 2019
1 parent 4628bfa commit d04f08e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion operatorcourier/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from operatorcourier.format import format_bundle
from operatorcourier.nest import nest_bundles

logging.basicConfig()
logger = logging.getLogger(__name__)


Expand Down
2 changes: 2 additions & 0 deletions operatorcourier/cli.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import argparse
import pkg_resources
import sys
import logging
from operatorcourier import api


def main():
"""Generate the CLI bits
"""
logging.basicConfig()
try:
parser = _CliParser()
parser.parse()
Expand Down

0 comments on commit d04f08e

Please sign in to comment.