Skip to content

Commit c70166d

Browse files
authored
Fix SQLAlchemy alembic default logging conig (#351)
1 parent 369f548 commit c70166d

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

bentoml/alembic.ini

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,4 @@ script_location = %(here)s/migrations
3535
# are written from script.py.mako
3636
# output_encoding = utf-8
3737

38-
sqlalchemy.url = ""
39-
40-
# Logging configuration
41-
[loggers]
42-
keys = root,sqlalchemy,alembic
43-
44-
[handlers]
45-
keys = console
46-
47-
[formatters]
48-
keys = generic
49-
50-
[logger_root]
51-
level = WARN
52-
handlers = console
53-
qualname =
54-
55-
[logger_sqlalchemy]
56-
level = WARN
57-
handlers =
58-
qualname = sqlalchemy.engine
59-
60-
[logger_alembic]
61-
level = INFO
62-
handlers =
63-
qualname = alembic
64-
65-
[handler_console]
66-
class = StreamHandler
67-
args = (sys.stderr,)
68-
level = WARN
69-
formatter = generic
70-
71-
[formatter_generic]
72-
format = %(levelname)-5.5s [%(name)s] %(message)s
73-
datefmt = %H:%M:%S
38+
sqlalchemy.url = ""

bentoml/migrations/env.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from logging.config import fileConfig
2-
31
from sqlalchemy import engine_from_config
42
from sqlalchemy import pool
53

@@ -9,10 +7,6 @@
97
# access to the values within the .ini file in use.
108
config = context.config
119

12-
# Interpret the config file for Python logging.
13-
# This line sets up loggers basically.
14-
fileConfig(config.config_file_name)
15-
1610
# add your model's MetaData object here
1711
# for 'autogenerate' support
1812
# from myapp import mymodel

0 commit comments

Comments
 (0)