diff --git a/pyvim/editor.py b/pyvim/editor.py index 98c3196..e1960c3 100644 --- a/pyvim/editor.py +++ b/pyvim/editor.py @@ -27,19 +27,19 @@ from .window_arrangement import WindowArrangement from .io import FileIO, DirectoryIO, HttpIO, GZipFileIO from .key_processor import VimKeyProcessor +from .utils import getLogger import pygments import os -logger = logging.getLogger() -logger.setLevel(logging.DEBUG) -# logger.addHandler(logging.FileHandler("./pyvim.log")) - __all__ = ( 'Editor', ) +logger = getLogger() + + class Editor(object): """ The main class. Containing the whole editor. diff --git a/pyvim/utils.py b/pyvim/utils.py index 766a1f3..a287a89 100644 --- a/pyvim/utils.py +++ b/pyvim/utils.py @@ -1,4 +1,5 @@ import re +import logging def re_finditer(sub, text, flags): @@ -8,3 +9,10 @@ def re_finditer(sub, text, flags): iterator = re.finditer(re.escape(sub), text, flags) return iterator + + +def getLogger(): + logger = logging.getLogger() + logger.setLevel(logging.DEBUG) + # logger.addHandler(logging.FileHandler("./pyvim.log")) +