Skip to content

Commit f503758

Browse files
Added: file path and line no in logs
1 parent efed2f9 commit f503758

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apertium/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ def update_path_windows() -> None:
7070
_update_modes(pair_path)
7171
append_pair_path_windows()
7272
update_path_windows()
73-
logging.basicConfig(format='%(asctime)s %(message)s', level=logging.WARNING)
73+
logging.basicConfig(format='[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s', level=logging.WARNING)
7474
logger = logging.getLogger()

apertium/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def execute_pipeline(inp: str, commands: List[List[str]]) -> str:
5050
fst.lt_proc(arg, path, input_file.name, output_file.name)
5151
end = output_file.read().encode()
5252
else:
53-
apertium.logger.warning('%s Calling subprocess %s', __name__, command[0])
53+
apertium.logger.warning('Calling subprocess %s', command[0])
5454
proc = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
5555
end, _ = proc.communicate(end)
5656
return end.decode()

0 commit comments

Comments
 (0)