From 9d2606d7caea73cc1d57b17256c7caf03f02e6f5 Mon Sep 17 00:00:00 2001 From: einarf Date: Mon, 5 Aug 2019 01:49:25 +0200 Subject: [PATCH] Add logger in shader loader --- moderngl_window/loaders/program/separate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moderngl_window/loaders/program/separate.py b/moderngl_window/loaders/program/separate.py index 23f2b831..4e94a359 100644 --- a/moderngl_window/loaders/program/separate.py +++ b/moderngl_window/loaders/program/separate.py @@ -1,8 +1,11 @@ +import logging import moderngl from moderngl_window.loaders.base import BaseLoader from moderngl_window.opengl import program from moderngl_window.exceptions import ImproperlyConfigured +logger = logging.getLogger(__name__) + class Loader(BaseLoader): kind = 'separate' @@ -40,7 +43,7 @@ def load_shader(self, shader_type: str, path: str): if not resolved_path: raise ImproperlyConfigured("Cannot find {} shader '{}'".format(shader_type, path)) - print("Loading:", path) + logger.info("Loading: %s", resolved_path) with open(resolved_path, 'r') as fd: return fd.read()