Skip to content

Commit 8feb3d0

Browse files
authored
Fix sw_logging when Logger.disabled is true (#281)
Co-authored-by: Jedore <[email protected]>
1 parent d756d69 commit 8feb3d0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- Fix exception handler in profile_context (#273)
4343
- Add namespace suffix to service name (#275)
4444
- Add periodical instance property report to prevent data loss (#279)
45+
- Fix sw_logging when `Logger.disabled` is true (#281)
4546

4647
- Docs:
4748
- New documentation on how to test locally (#222)

skywalking/log/sw_logging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def install():
3939
def _sw_handle(self, record):
4040
_handle(self=self, record=record)
4141

42+
if self.disabled:
43+
return
44+
4245
if record.name in ['skywalking', 'skywalking-cli', 'skywalking-loader']: # Ignore SkyWalking internal loggers
4346
return
4447

0 commit comments

Comments
 (0)