Skip to content

Commit 00e4664

Browse files
Update logging in GracefulShutdownHandler to use logger instead of print statements for SIGINT and SIGTERM signals
1 parent ad2d541 commit 00e4664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py_spring_core/core/interfaces/graceful_shutdown_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, timeout_seconds: float, timeout_enabled: bool) -> None:
3939

4040
def _handle_sigint(self, signum: int, frame: Optional[FrameType]) -> None:
4141
try:
42-
print("[Signal] SIGINT received")
42+
logger.info("[Signal] SIGINT received")
4343
self._shutdown_type = ShutdownType.MANUAL
4444
self._shutdown_event.set()
4545
self._start_shutdown_timer()
@@ -49,7 +49,7 @@ def _handle_sigint(self, signum: int, frame: Optional[FrameType]) -> None:
4949

5050
def _handle_sigterm(self, signum: int, frame: Optional[FrameType]) -> None:
5151
try:
52-
print("[Signal] SIGTERM received")
52+
logger.info("[Signal] SIGTERM received")
5353
self._shutdown_type = ShutdownType.SIGTERM
5454
self._shutdown_event.set()
5555
self._start_shutdown_timer()

0 commit comments

Comments
 (0)