@@ -939,10 +939,16 @@ def std_to_otel(levelno: int) -> SeverityNumber:
939939def is_less_than_min_severity (
940940 record : LogRecord , min_severity : SeverityNumber
941941) -> bool :
942- """
943- Check if the log record's severity number is less than the minimum severity level. If a log record's severity number is
944- specified (i.e. not `0`) and is less than the configured `minimum_severity`, the log record MUST be dropped by the `Logger`.
945- Log records with an unspecified severity (i.e. `0`) are not affected by this parameter and therefore bypass minimum severity filtering.
942+ """Check if the log record's severity number is less than the minimum severity level.
943+
944+ Args:
945+ record: The log record to be processed.
946+ min_severity: The minimum severity level.
947+
948+ Returns:
949+ True if the log record's severity number is less than the minimum
950+ severity level, False otherwise. Log records with an unspecified severity (i.e. `0`) are not
951+ affected by this parameter and therefore bypass minimum severity filtering.
946952 """
947953 if record .severity_number is not None :
948954 if (
@@ -957,13 +963,6 @@ def is_less_than_min_severity(
957963def should_drop_logs_for_unsampled_trace (
958964 record : LogRecord , trace_based : bool
959965) -> bool :
960- """
961- Determines whether the logger should only process log records associated with sampled traces.
962- If not explicitly set, the `trace_based` parameter is set to `false`. If `trace_based` is `true`, log records associated with unsampled traces
963- are dropped by the `Logger`. A log record is considered associated with an unsampled trace if it has a valid `SpanId` and its `TraceFlags` indicate
964- that the trace is unsampled. A log record that isn't associated with a trace context is not affected by this parameter and therefore bypasses
965- trace-based filtering.
966- """
967966 if trace_based :
968967 if record .context is not None :
969968 span = get_current_span (record .context )
0 commit comments