{"id":26967154,"url":"https://github.com/frazer-rbsn/log.swift","last_synced_at":"2026-05-18T19:33:59.889Z","repository":{"id":191928799,"uuid":"137578600","full_name":"frazer-rbsn/log.swift","owner":"frazer-rbsn","description":"A simple logging class in Swift, with an API based on Android's Log.","archived":false,"fork":false,"pushed_at":"2021-03-14T18:33:49.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-09-01T15:29:03.136Z","etag":null,"topics":["console","ios","logger","logging","macos","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frazer-rbsn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-16T12:20:46.000Z","updated_at":"2023-09-01T15:29:10.733Z","dependencies_parsed_at":null,"dependency_job_id":"36a48b84-9c7c-4761-810e-3e6c4520cd02","html_url":"https://github.com/frazer-rbsn/log.swift","commit_stats":null,"previous_names":["frazer-rbsn/log.swift"],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frazer-rbsn%2Flog.swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frazer-rbsn%2Flog.swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frazer-rbsn%2Flog.swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frazer-rbsn%2Flog.swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frazer-rbsn","download_url":"https://codeload.github.com/frazer-rbsn/log.swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970337,"owners_count":20862508,"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":["console","ios","logger","logging","macos","swift"],"created_at":"2025-04-03T08:50:05.999Z","updated_at":"2026-05-18T19:33:54.856Z","avatar_url":"https://github.com/frazer-rbsn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log.swift\n\n[![Travis build status](https://travis-ci.org/frazer-rbsn/Log.swift.svg?branch=master)](https://travis-ci.org/frazer-rbsn/Log.swift)\n\n`Log.swift` is a simple logging class with an API based on Android's `Log`. It is not a fully-featured logging framework, instead it is intended as a basic, useful replacement for `print()` statements to use when debugging your projects.\n\n* easy configuration\n* prints file name, line number, function name\n* prints current thread (optional)\n* simple timestamps (optional)\n* symbol (optional)\n* output to log file -- please set `logFileLocation` and `shouldLogToFile` to `true`\n* can output using `print()` or `os_log()` (macOS 10.12 or newer only)\n\n\n#### How to use:\nLog has static log functions that use a private static instance, so you don't need to instantiate a `Log` object to use it, but you can if you wish.\n\n```swift\nLog.e(\"A really bad thing happened!\")\n```\noutputs:\n```\n14:19:30 [ERROR] Foo.swift 67 buggyFunction(): A really bad thing happened!\n```\n\nLikewise:\n\n```swift\nlet eventLogger = Log(identifier: \"system\")\neventLogger.e(\"A really bad thing happened!\")\n```\noutputs:\n```\n14:19:30 [ERROR] Foo.swift 67 buggyFunction(): A really bad thing happened!\n```\n\n\n#### Log levels:\n\n```swift\nLog.v() // [VERBOSE]\nLog.d() // [DEBUG]\nLog.i() // [INFO]\nLog.w() // [WARNING]\nLog.e() // [ERROR]\nLog.f() // [FATAL] (Calls fatalError() to crash the application/service.)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrazer-rbsn%2Flog.swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrazer-rbsn%2Flog.swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrazer-rbsn%2Flog.swift/lists"}