Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shibapm/logger
Really lightweight logger for your CLI app
https://github.com/shibapm/logger
cli logger spm swift swift-package-manager
Last synced: 7 days ago
JSON representation
Really lightweight logger for your CLI app
- Host: GitHub
- URL: https://github.com/shibapm/logger
- Owner: shibapm
- License: mit
- Created: 2018-11-24T22:51:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-02T00:47:25.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T17:18:05.528Z (13 days ago)
- Topics: cli, logger, spm, swift, swift-package-manager
- Language: Swift
- Size: 17.6 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Logger
Really lightweight logger for your CLI app
### Installing
Use SPM to install logger
```swift
let package = Package(
name: "danger-swift",
...
dependencies: [
.package(url: "https://github.com/f-meloni/Logger", from: "0.1.0"),
],
...
)
```### Use Logger
Logger offers you different functions dipending on the type of log you want to use.
Some examples:
```swift
let logger = Logger()// prints:
// Message 1 Message 2
logger.debug("Message 1", "Message 2")// prints:
// Message 1
// Message 2
logger.logInfo("Message 1", "Message 2", separator: "\n")// prints:
// WARNING: WarningMessage!
logger.logWarning("WarningMessage", terminator: "!")// prints:
// ERROR: ErrorMessage
logger.logError("ErrorMessage")
```