Files
swift-log/Sources/Logging/Docs.docc/Reference/Logger.md
T
Joseph HeckandVladimir Kukushkin c4e96785bf Add missing api refs (#478)
Expands on @kukushechkin #474 (add-missing API) and tacks in some
additional work

### Motivation:

resolve the DocC warnings

### Modifications:

- resolves docc warnings for soundness checks 
- updates curation to drop the task-local logger updates into the
correct areas
- updates curation to collect the implemented proposals together

### Result:

Hopefully no issues with soundness checks

---------

Co-authored-by: Vladimir Kukushkin <kukushechkin@apple.com>
2026-06-25 11:00:42 +01:00

2.2 KiB

Logging/Logger

Topics

Creating Loggers

  • init(label:)
  • init(label:metadataProvider:)
  • init(label:factory:)-9uiy2
  • init(label:factory:)-6iktu
  • MetadataProvider

Task-local logger

  • current
  • withLogger(_:_:)-3dt06
  • withLogger(_:_:)-70nli
  • withLogger(mergingMetadata:_:)-2c7dy
  • withLogger(mergingMetadata:_:)-3eduo
  • withLogger(logLevel:handler:metadata:_:)-2pd9p
  • withLogger(logLevel:handler:metadata:_:)-5nmw6

Sending trace log messages

  • trace(_:metadata:file:function:line:)
  • trace(_:metadata:source:file:function:line:)
  • trace(_:error:metadata:source:file:function:line:)

Sending debug log messages

  • debug(_:metadata:file:function:line:)
  • debug(_:metadata:source:file:function:line:)
  • debug(_:error:metadata:source:file:function:line:)

Sending info log messages

  • info(_:metadata:file:function:line:)
  • info(_:metadata:source:file:function:line:)
  • info(_:error:metadata:source:file:function:line:)

Sending notice log messages

  • notice(_:metadata:file:function:line:)
  • notice(_:metadata:source:file:function:line:)
  • notice(_:error:metadata:source:file:function:line:)

Sending warning log messages

  • warning(_:metadata:file:function:line:)
  • warning(_:metadata:source:file:function:line:)
  • warning(_:error:metadata:source:file:function:line:)

Sending error log messages

  • error(_:metadata:file:function:line:)
  • error(_:metadata:source:file:function:line:)
  • error(_:error:metadata:source:file:function:line:)

Sending critical log messages

  • critical(_:metadata:file:function:line:)
  • critical(_:metadata:source:file:function:line:)
  • critical(_:error:metadata:source:file:function:line:)

Sending general log messages

  • log(level:_:metadata:file:function:line:)
  • log(level:_:metadata:source:file:function:line:)
  • log(level:_:error:metadata:source:file:function:line:)
  • Level
  • Message
  • Metadata

Adjusting logger metadata

  • subscript(metadataKey:)
  • MetadataValue

Metadata attribute types

  • MetadataValueAttributes

Inspecting a logger

  • label
  • logLevel
  • handler
  • metadataProvider