@@ -952,10 +952,16 @@ def std_to_otel(levelno: int) -> SeverityNumber:
952952def is_less_than_min_severity (
953953 record : LogRecord , min_severity : SeverityNumber
954954) -> bool :
955- """
956- Check if the log record's severity number is less than the minimum severity level. If a log record's severity number is
957- specified (i.e. not `0`) and is less than the configured `minimum_severity`, the log record MUST be dropped by the `Logger`.
958- Log records with an unspecified severity (i.e. `0`) are not affected by this parameter and therefore bypass minimum severity filtering.
955+ """Check if the log record's severity number is less than the minimum severity level.
956+
957+ Args:
958+ record: The log record to be processed.
959+ min_severity: The minimum severity level.
960+
961+ Returns:
962+ True if the log record's severity number is less than the minimum
963+ severity level, False otherwise. Log records with an unspecified severity (i.e. `0`) are not
964+ affected by this parameter and therefore bypass minimum severity filtering.
959965 """
960966 if record .severity_number is not None :
961967 if (
@@ -970,13 +976,6 @@ def is_less_than_min_severity(
970976def should_drop_logs_for_unsampled_trace (
971977 record : LogRecord , trace_based : bool
972978) -> bool :
973- """
974- Determines whether the logger should only process log records associated with sampled traces.
975- If not explicitly set, the `trace_based` parameter is set to `false`. If `trace_based` is `true`, log records associated with unsampled traces
976- 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
977- 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
978- trace-based filtering.
979- """
980979 if trace_based :
981980 if record .context is not None :
982981 span = get_current_span (record .context )
0 commit comments