An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
June 26, 2021 08:47 pm GMT
Original Link: https://dev.to/clsource/a-logging-system-95c
A Logging System
This is a small logging system based of Swift Log which is a Swift logging API package.
UML
Main Components
LoggingSystem
The main faade. 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.
Original Link: https://dev.to/clsource/a-logging-system-95c
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To