Skip to content

Commit a74bc0f

Browse files
authored
fix: remove duplicate log entries by forcing logging.basicConfig to rerun (#2516)
* fix: remove duplicate log entries by forcing logging.basicConfig to run again * doc: wrong PR number in news item
1 parent 838deeb commit a74bc0f

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

conda_smithy/cli.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,7 @@ def __call__(self, args):
747747

748748

749749
def main(argv=None):
750-
logger = logging.getLogger("conda_smithy")
751-
handler = logging.StreamHandler()
752-
handler.setFormatter(logging.Formatter(logging.BASIC_FORMAT, None, "%"))
753-
logger.addHandler(handler)
754-
logger.setLevel(logging.INFO)
750+
logging.basicConfig(level=logging.INFO, force=True)
755751

756752
parser = argparse.ArgumentParser(
757753
prog="conda smithy",

news/2516-fix-duplicate-logs.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* Fixed duplicate log entries. (#2516)
20+
21+
**Security:**
22+
23+
* <news item>

0 commit comments

Comments
 (0)