Skip to content

Commit

Permalink
deplacement logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliettejns committed Sep 12, 2024
1 parent 668fd90 commit fbabbcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
login_manager.session_protection = 'strong'
login_manager.login_view = 'account.login'

logging.basicConfig(filename='./pyrrha_corpus_creation.log', level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(name)s %(message)s')

logger = logging.getLogger(__name__)


def create_app(config_name="dev"):
""" Create the application """
Expand Down Expand Up @@ -65,8 +70,7 @@ def _set_sqlite_case_insensitive_pragma(dbapi_con, connection_record):
md = Markdown(app, safe_mode=True)
babel.init_app(app, locale_selector=get_locale)

logging.basicConfig(filename='./pyrrha_corpus_creation.log', level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(name)s %(message)s')


# Register Jinja template functions
from .main import main as main_blueprint
Expand Down
6 changes: 3 additions & 3 deletions app/main/views/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import sqlalchemy.exc
from sqlalchemy import func, distinct, text
from typing import List
import logging


from app import db
Expand All @@ -22,7 +21,8 @@
from .utils import requires_corpus_admin_access, requires_corpus_access
from ..forms import Delete
from app.utils import PreferencesUpdateError, PersonalDictionaryError

from app import logger
import logging
AUTOCOMPLETE_LIMIT = 20


Expand All @@ -42,7 +42,7 @@ def _get_available():
def corpus_new():
""" Register a new corpus
"""
logger = logging.getLogger(__name__)

lemmatizers = current_app.config.get("LEMMATIZERS", [])

def normal_view():
Expand Down

0 comments on commit fbabbcf

Please sign in to comment.