A framework in Swift to create and manage log entries.
SwifterLog is part of the Swiftfire, the HTTP(S) webserver framework.
- 5 different logging targets:
- The OS Log facility
- A file
- STDOUT (println)
- A network destination
- A list of callback objects from the Application itself.
- 8 log levels:
- Each logging target can have its own cut-off level for the information that is logged.
- The file target can be configured to store the log info in a predefined number of files of a predefined maximum size. When the maximum number of files is exceeded, the oldest file will automatically be removed.
- Included high performance non-evaluation destinations to allow debug logging calls to remain in shipping code
- Compiles using SPM (Swift Package Manager)
- Includes Xcode project that creates a modular framework.
Project website: http://swiftfire.nl/projects/swiftfire/swiftfire.html
Reference manual: http://swiftfire.nl/projects/swiftfire/reference/index.html
Installation: http://swiftfire.nl/projects/swifterlog/reference/installation.html or on github
User Manual: http://swiftfire.nl/projects/swifterlog/reference/usermanual.html or on github
Note: Planned releases are for information only, they are subject to change without notice.
Maintenance updates are updates due to management of the (SPM) package hierarchy, they don't affect the source code.
- No new features planned. Features and bugfixes will be made on an ad-hoc basis as needed to support Swiftfire development.
- For feature requests and bugfixes please contact firstname.lastname@example.org
- Will be release in sync with Swiftfire 1.0.0
v1.7.0 (as needed for bugfixes and possible feature updates)
- Undid the disabling of time info in Stdout target (not needed)
- Fixed level-inversion bug that made the newest versions of SwifterLog unworkable
- Added disabling of time info to Stdout target
- Added disable/enable settings for OSLog target
- Made the message parameter implicit
- Replace ASL with os_log
- Migration to SPM 4
- Migration to Swift 4, minor changes.
- Updated user manual
- Updated dependecies
- Split off from 1.0.1, new implementation.
- Updated dependecies (VJson & SwifterSockets)
- No changes but this readme file since the previous version.
- Changed SwifterJSON to VJson
- Upped SwifterSockets from 0.10.7 to 0.10.8
- Upped SwifterJSON from 0.10.5 to 0.10.6
- Update of SwifterSockets to 0.10.7
- Bugfix: Fixed initialization of the 'atInfo' logger.
- Update of SwifterJSON to 0.10.4
- Update of SwifterSockets to 0.10.6
- Update of SwifterJSON to 0.10.3
- Update of SwifterSockets to 0.10.5
- Update of SwifterSockets to 0.10.4
- Updated to SwifterJSON 0.10.2
- Update of SwifterSockets to 0.10.3
- Result type was moved from SwifterSockets to BRUtils
- Added compilation speed increase in SwifterSockets 0.10.1
- Removed xcodeproj from github
- Update to SwifterJSON 0.10.1
- Removed global 'log' definition, use SwifterLog.theLogger instead. (let log = SwifterLog.theLogger)
- Added faster loggers for disabled log levels. (eg: SwifterLog.atDebug?.log(...))
- Replaced local c-glue with CAsl glue library (now builds under SPM)
- Maintenance updates
- Changed distribution model
- Added reference manual (improved documentation)
- Upgraded to Xcode 8 beta 6 (Swift 3)
- Upgraded to Xcode 8 beta 3 (Swift 3)
- Update to accomodate VJson v0.9.8
- Update to accomodate VJson updates
- Added 'public' to the string extensions
- Added 'ReflectedStringConvertible' (Idea from Matt Comi)
- Changed message parameter from 'String' to 'Any' on all logging calls (Inspired by whitehat007)
- Fixed bug that would not call the callback destination for the very first logging message
- Added a few unit tests
- Header update to include new website: swiftfire.nl
- Renamed SwifterLogNetwork.swift to SwifterLog.Network.swift
- Removed all targets
- Removed other unnecessary files
- Moved the network support to its own file (as far as possible).
- Added release tag
- Included extension for type String to easily create a SOURCE identifier from a #file string.
- JSON code returned by 'json' changed from a value to a valid hierarchy.
- Added ALL_NON_RECURSIVE target definition.
- Updated for changes in SwifterSockets.Transmit
- Added transfer of log entries to a TCP/IP destination and targetting of error messages.
- Renamed logfileRecordAtAndAboveLevel to fileRecordAtAndAboveLevel
- Added call-back logging
- Added conveniance functions that add the "ID" parameter back in as hexadecimal output before the source.
- Note: v0.9.4 was never released into the public.
- Updated for Swift 2.0
Help us keep the lights on
1.3.0 - Apr 12, 2018
With this release support for ASL has been dropped in favor of OSLog. As of MacOS 10.12 Apple has moved away from ASL and pushes for support of OSLog.
In addition, Swift 4 made it possible to omit the source specification from the calls by using default values for file, function and line numbers. The API has been simplified to support this.
Furthermore, in order to make the API more universal, the optionality of the 'id' and 'type' parameter was dropped. They were replaced by default values of -1 resp 'noType'.
Lastly, Swift 4 seems to have changed the implementation of Any which caused a bug when logging messages (strangely enough not always, but sometimes). The 'message' parameter was thus changed from 'Any' to 'CustomStringConvertible' (which actually makes more sense anyway).
1.2.0 - Apr 9, 2018
Switched to Swift Package Manager 4
1.1.2 - Apr 6, 2018
Minor updates for Swift 4 migration. Updated the included user manual.
1.1.1 - Mar 31, 2018
Due to updates in BRUtils, both SwifterSockets and VJson had to be updated.
1.1.0 - Nov 25, 2017
Release for development purposes.