Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyadeepm04 committed Jul 11, 2024
1 parent 2dc0312 commit 878c429
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ def get_logger(
attributes: Optional[Attributes] = None,
) -> Logger:
"""Returns a NoOpLogger."""
return NoOpLogger(name, version=version, schema_url=schema_url, attributes=attributes)
return NoOpLogger(
name, version=version, schema_url=schema_url, attributes=attributes
)


class ProxyLoggerProvider(LoggerProvider):
Expand Down Expand Up @@ -283,5 +285,8 @@ def get_logger(
if logger_provider is None:
logger_provider = get_logger_provider()
return logger_provider.get_logger(
instrumenting_module_name, instrumenting_library_version, schema_url, attributes
instrumenting_module_name,
instrumenting_library_version,
schema_url,
attributes,
)
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,12 @@ def get_logger(
) -> Logger:
if self._disabled:
_logger.warning("SDK is disabled.")
return NoOpLogger(name, version=version, schema_url=schema_url, attributes=attributes)
return NoOpLogger(
name,
version=version,
schema_url=schema_url,
attributes=attributes,
)
return Logger(
self._resource,
self._multi_log_record_processor,
Expand Down
4 changes: 3 additions & 1 deletion opentelemetry-sdk/tests/logs/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def test_get_logger(self):
self.assertEqual(
logger._instrumentation_scope.schema_url, "schema_url"
)
self.assertEqual(logger._instrumentation_scope.attributes, {"key": "value"})
self.assertEqual(
logger._instrumentation_scope.attributes, {"key": "value"}
)

@patch.dict("os.environ", {OTEL_SDK_DISABLED: "true"})
def test_get_logger_with_sdk_disabled(self):
Expand Down

0 comments on commit 878c429

Please sign in to comment.