DEV Community

Cover image for A Logging System
Camilo
Camilo

Posted on

3

A Logging System

This is a small logging system based of Swift Log which is a Swift logging API package.

UML

Logging System UML

Main Components

LoggingSystem

The main façade. It can only booted once with a Logger instance.

Logger

This will call the LogHandler instance with the proper log level and other params provided by the caller.

LogHandler

A protocol which the log handlers must implement. It mainly contains a log function to pass the params.

MultiplexLogHandler

An implementation of the LogHandler protocol. Can pass the log message to other log handlers. Useful if you wish to log messages to local and remote systems using different handlers.

StreamLogHandler

An implementation of the LogHandler protocol that sends the messages to standard output or standard error.

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay