Library Moduleswift-log 1.6.2Logging

Logging

A Logging API for Swift.

index.md
import Logging

Module information

Declarations
100
Symbols
124

Coverage

64.0 percent of the declarations in Logging are fully documented35.0 percent of the declarations in Logging are indirectly documented1.0 percent of the declarations in Logging are completely undocumented

Declarations

2.0 percent of the declarations in Logging are operators33.0 percent of the declarations in Logging are initializers, type members, or enum cases35.0 percent of the declarations in Logging are instance members4.0 percent of the declarations in Logging are instance subscripts2.0 percent of the declarations in Logging are protocols6.0 percent of the declarations in Logging are protocol requirements3.0 percent of the declarations in Logging are default implementations9.0 percent of the declarations in Logging are structures6.0 percent of the declarations in Logging are typealiases

Interfaces

99.0 percent of the declarations in Logging are unrestricted1.0 percent of the declarations in Logging are underscored
Module stats and coverage details

Getting Started

If you have a server-side Swift application, or maybe a cross-platform (for example Linux & macOS) app/library, and you would like to log, we think targeting this logging API package is a great idea. Below you’ll find all you need to know to get started.

Log handler implementations

This package offers the common Logging API as well as a very simple stdout log handler.

In a real system or application, you will want to use one of the many community maintained log handler implementations.

Please refer to the complete list of community maintained logging backend implementations.

Logging API

  • struct Logger

    A Logger is the central type in SwiftLog. Its central function is to emit log messages using one of the methods corresponding to a log level.

  • enum LoggingSystem

    The LoggingSystem is a global facility where the default logging backend implementation (LogHandler) can be configured. LoggingSystem is set up just once in a given program to set up the desired logging backend implementation.

Log Handlers