improve log
This commit is contained in:
parent
798e27ab16
commit
a9f7fa3568
|
|
@ -91,10 +91,16 @@ def execute_sql_file(ctx, database, sql_file):
|
||||||
)
|
)
|
||||||
docker_result = container.exec_run(docker_command)
|
docker_result = container.exec_run(docker_command)
|
||||||
if docker_result.exit_code != 0:
|
if docker_result.exit_code != 0:
|
||||||
logger.error(docker_result.output)
|
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"The script '%s' failed on database %s. Exit Code : %d"
|
"The script '%s' failed on database %s.\n"
|
||||||
% (relative_path, database, docker_result.exit_code)
|
"- Exit Code : %d\n"
|
||||||
|
"- Output: %s"
|
||||||
|
% (
|
||||||
|
relative_path,
|
||||||
|
database,
|
||||||
|
docker_result.exit_code,
|
||||||
|
docker_result.output,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user