From 02dd3ebbe40f448b6e0a366599ed11f2e780dca4 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Tue, 8 Jan 2019 09:23:16 -0500 Subject: [PATCH] Disable source loading https://stackoverflow.com/a/17407257/429533 --- log/utils.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/log/utils.py b/log/utils.py index 9c75cb0..0db1437 100644 --- a/log/utils.py +++ b/log/utils.py @@ -14,7 +14,8 @@ def create_logger_record(level, message, *args, exc_info=None, **kwargs): elif not state.initialized: helpers.init() - frame, filename, lineno, *_ = inspect.stack()[3] + frame, filename, lineno, *_ = inspect.stack(0)[3] + module = inspect.getmodule(frame) logger = logging.getLogger(module.__name__) diff --git a/pyproject.toml b/pyproject.toml index a6e7264..25ec94d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "minilog" -version = "1.2.1" +version = "1.2.2" description = "Minimalistic wrapper for Python logging." license = "MIT"