https://github.com/beapp/beapp.library.logger.ios
This Pod allows you to centralize the logs of your app, and distribute them wherever you want.
https://github.com/beapp/beapp.library.logger.ios
ios logger logging
Last synced: 11 months ago
JSON representation
This Pod allows you to centralize the logs of your app, and distribute them wherever you want.
- Host: GitHub
- URL: https://github.com/beapp/beapp.library.logger.ios
- Owner: BeApp
- License: apache-2.0
- Created: 2019-05-13T08:09:37.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2023-11-03T11:33:23.000Z (over 2 years ago)
- Last Synced: 2025-07-13T22:45:52.998Z (12 months ago)
- Topics: ios, logger, logging
- Language: Swift
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BeappLogger
[](https://cocoapods.org/pods/BeappLogger)
This Pod allows you to centralize the logs of your app, and distribute them wherever you want, thanks to an Appender system
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Installation
To install it, simply add the following line to your Podfile:
```
pod 'BeappLogger'
```
## Usage
In your AppDelegate
```
Logger.build(with: PrintAppender(), FileAppender(filename: "app_log.txt"))
```
or use the default Logger (`OSLogger.log` for iOS >= 14.0 or `log` for iOS < 14.0)
```
Logger.build()
```
Then, in your app, use it simply like this
```
Logger.debug("TEST")
Logger.info("TEST")
Logger.warn("TEST")
Logger.error("TEST")
Logger.trace()
```
### Result
```
2019-02-05 04:51:41.636 [💬][AppDelegate: application(_:didFinishLaunchingWithOptions:) (24)] TEST
2019-02-05 04:51:41.652 [ℹ️][AppDelegate: application(_:didFinishLaunchingWithOptions:) (25)] TEST
2019-02-05 04:51:41.652 [⚠️][AppDelegate: application(_:didFinishLaunchingWithOptions:) (26)] TEST
2019-02-05 04:51:41.653 [🔥][AppDelegate: application(_:didFinishLaunchingWithOptions:) (27)] TEST
```
## Author
Beapp, contact@beapp.fr
## License
BeappLogger is available under the MIT license. See the LICENSE file for more info.