Skip to content

Commit

Permalink
Add logger in shader loader
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Aug 4, 2019
1 parent 8eacd73 commit 9d2606d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion moderngl_window/loaders/program/separate.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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()

0 comments on commit 9d2606d

Please sign in to comment.