Skip to content

Commit

Permalink
move getLogger() to utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Aug 13, 2024
1 parent 2955e79 commit ea621fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyvim/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions pyvim/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import logging


def re_finditer(sub, text, flags):
Expand All @@ -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"))

0 comments on commit ea621fd

Please sign in to comment.