{"id":13793575,"url":"https://github.com/atereshkov/EXPLogger","last_synced_at":"2025-05-12T20:31:06.515Z","repository":{"id":56909587,"uuid":"100747824","full_name":"atereshkov/EXPLogger","owner":"atereshkov","description":"A lightweight and simple logger for Swift projects","archived":false,"fork":false,"pushed_at":"2018-02-05T07:02:52.000Z","size":122,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T14:57:07.145Z","etag":null,"topics":["cocoapod","cocoapod-pod","debug","debugging","ios","logging","logging-library","macos","swift","swift-framework","swift-library","swift4","tvos"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atereshkov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-18T20:27:34.000Z","updated_at":"2018-11-02T07:15:10.000Z","dependencies_parsed_at":"2022-08-20T20:20:38.657Z","dependency_job_id":null,"html_url":"https://github.com/atereshkov/EXPLogger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atereshkov%2FEXPLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atereshkov%2FEXPLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atereshkov%2FEXPLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atereshkov%2FEXPLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atereshkov","download_url":"https://codeload.github.com/atereshkov/EXPLogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253816704,"owners_count":21968869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapod","cocoapod-pod","debug","debugging","ios","logging","logging-library","macos","swift","swift-framework","swift-library","swift4","tvos"],"created_at":"2024-08-03T23:00:24.783Z","updated_at":"2025-05-12T20:31:06.119Z","avatar_url":"https://github.com/atereshkov.png","language":"Swift","funding_links":[],"categories":["Logging"],"sub_categories":[],"readme":"# EXPLogger \n![](https://img.shields.io/cocoapods/v/EXPLogger.svg) ![](https://img.shields.io/cocoapods/p/EXPLogger.svg) ![](https://img.shields.io/travis/atereshkov/EXPLogger.svg) ![](https://img.shields.io/cocoapods/dt/EXPLogger.svg) ![](https://img.shields.io/cocoapods/dw/EXPLogger.svg) ![](https://img.shields.io/cocoapods/l/EXPLogger.svg)\n### A lightweight and simple logger for Swift projects\n\nColorful, flexible, lightweight logging for Swift 4.\n\n---\n\n## Navigation\n\n* [Example](#example)\n* [Installation](#installation)\n* [Advanced Usage](#advanced-usage)\n* [Documentation](#documentation)\n* [Communication and help](#communication-and-help)\n* [Changelog](#changelog)\n* [License](#license)\n\n---\n\n## Example\n\nExample of output in Xcode Console:\n\n```\n23:21:37.635 [VERBOSE] [OrdersVC.viewDidLoad():24] - Some non important information\n23:21:37.636 [DEBUG] [OrdersVC.viewDidLoad():25] - Some useful information just to debugging\n23:21:37.636 [INFO] [OrdersVC.viewDidLoad():26] - Useful information, etc\n23:21:37.636 [WARNING] [OrdersVC.viewDidLoad():27] - Not a good information\n23:21:37.636 [ERROR] [OrdersVC.viewDidLoad():28] - Some important error\n23:21:37.636 [CRITICAL] [OrdersVC.viewDidLoad():29] - Something went so wrong with critical priority\n```\n\nOr one more example:\n\n![Example of output](http://image.ibb.co/dXyJWk/image.png)\n\n* Now there are some problems with displaying colors from the Xcode 8, so they are temporarily replaced by Emoji (if u want, ofc.\n\n---\n\n## Installation\n\n### Cocoapods\n\nTo use EXPLogger with CocoaPods add this to your Podfile:\n\n```\npod 'EXPLogger', '~\u003e 1.0.3'\n```\n\nThen run pod install.\nFor details of the installation and usage of CocoaPods, [visit it's official web site](https://cocoapods.org/).\n\n### Swift Package Manager\n\nWill be available soon.\n\n### Carthage\n\nWill be available soon.\n\n---\n\n## Usage\n\n_This quick start method is intended just to get you up and running with the EXPLogger. You should however use the [advanced usage](#advanced-usage) below to get the most out of this library._\n\nAdd this code at the top of your AppDelegate.swift to be able to use EXPLogger in your whole project. \nOr just use it in your individual classes. It's up to you.\n\n\n1. Import\n\n```swift\nimport EXPLogger\n```\n\n2. Declare an instance of the logger\n\n```swift\nlet log = EXPLogger.self\n```\n\nIn the AppDelegate method didFinishLaunchingWithOptions() add the EXPLogger log targets (console, file, etc.). And it's ready to use.\n\n3. Set up logger\n\n```swift\n// add log targets (important! at least one is needed)\nlet console = ConsoleTarget() // xcode console\n\n// add the targets to log\nlog.addTarget(console)\n\n// log anything you want in your whole project!\nlog.verbose(\"Some non important information that can be easily skipped\")\nlog.debug(\"Some useful information just to debugging\")\nlog.info(\"Useful information, etc\")\nlog.warning(\"Not a good information\")\nlog.error(\"Some error\")\nlog.critical(\"Something went so wrong with critical prior\")\n```\n\nThe different methods set the log level of the message. EXPLogger will only print messages with a log level that is greater to or equal to it's current log level setting. So a logger with a level of .error will only output log messages with a level of .error, or .critical.\n\n### Log Anything\n\nYou can log simple strings:\n\n```swift\nlog.debug(\"Hi there, I'm EXPLogger!\")\n```\n\nOr just anything you want, for example:\n\n```swift\nlog.debug((4, 2, 1, 0, 5)) // array\nlog.debug(true) // boolean\nlog.debug(CGPoint(x: 1.1, y: 2.2)) // something like this\nlog.debug(Enum.Option) // enums\n```\n\n---\n\n## Advanced Usage\n\nEXPLogger allows for much greater control and flexibility.\n\nEXPlogger can be configured to deliver log messages to a variety of destinations. Using the [basic setup](#usage) above, the logger will output log messages to the standard Xcode debug console just in a few lines of setup.\n\n* Here's an example of configuring the logger with some additional settings.\n\n```swift\n// add log targets\nlet console = ConsoleTarget() // xcode console\n\nconsole.showDate = false // (default is true)\nconsole.showLogTag = true // (default is true)\nconsole.showFileName = true // (default is true)\nconsole.showFunctionName = false // (default is true)\nconsole.showThreadName = true // (default is false) *will be available soon\nconsole.showLineNumber = true // (default is true)\nconsole.showLevel = false // (default is true)\nconsole.showFileSuffix = true // (default is true)\nconsole.enableColors = false // (default is false) *not working for now in Xcode 8\nconsole.defaultDateFormat = \"HH:mm:ss\" // (default is \"HH:mm:ss.SSS\")\nconsole.defaultTimeZone = \"UTC\" // (default will be TimeZone.Current)\n\n// add the targets to log\nlog.addTarget(console)\n\n// log anything you want in your whole project!\n...\n```\n\nIf you don't configure these functions, EXPLogger will work based on default values.\n\n* Here's an example of configuring the logger with some additional destinations.\n\nWill be filled soon.\n\n---\n\n## Documentation\n\nWill be filled soon.\n\n---\n\n## Communication and Help\n\n* If you need help, use [Stack Overflow](http://stackoverflow.com/questions/tagged/explogger) (Tag 'explogger') or [open an issue](https://github.com/atereshkov/EXPLogger/issues/new).\n* If you'd like to ask a general question, use [Stack Overflow](http://stackoverflow.com/questions/tagged/explogger) or [open an issue](https://github.com/atereshkov/EXPLogger/issues/new).\n* If you've found a bug, [open an issue](https://github.com/atereshkov/EXPLogger/issues/new).\n* If you have a feature request, [open an issue](https://github.com/atereshkov/EXPLogger/issues/new).\n* If you want to contribute, submit a [pull request](https://github.com/atereshkov/EXPLogger/pulls).\n* If you use and enjoy EXPlogger, please star the [project on GitHub](https://github.com/atereshkov/EXPLogger).\n\n---\n\n## Changelog\n\nSee [CHANGELOG](https://github.com/atereshkov/EXPLogger/blob/master/CHANGELOG.md).\n\n---\n\n## License\n\nEXPLogger Library is released under the [MIT License](https://github.com/atereshkov/EXPLogger/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatereshkov%2FEXPLogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatereshkov%2FEXPLogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatereshkov%2FEXPLogger/lists"}