{"id":17688047,"url":"https://github.com/itztravelintime/swiftloggedprint","last_synced_at":"2025-09-11T00:41:26.143Z","repository":{"id":134177771,"uuid":"382792264","full_name":"ITzTravelInTime/SwiftLoggedPrint","owner":"ITzTravelInTime","description":"Swift Library for logged and better prints.","archived":false,"fork":false,"pushed_at":"2022-06-17T11:37:29.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T01:39:37.179Z","etag":null,"topics":["library","package","print","swift","tinu"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ITzTravelInTime.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-04T07:38:20.000Z","updated_at":"2021-11-19T11:43:35.000Z","dependencies_parsed_at":"2024-08-13T11:02:24.665Z","dependency_job_id":null,"html_url":"https://github.com/ITzTravelInTime/SwiftLoggedPrint","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITzTravelInTime%2FSwiftLoggedPrint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITzTravelInTime%2FSwiftLoggedPrint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITzTravelInTime%2FSwiftLoggedPrint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITzTravelInTime%2FSwiftLoggedPrint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ITzTravelInTime","download_url":"https://codeload.github.com/ITzTravelInTime/SwiftLoggedPrint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246381680,"owners_count":20768075,"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":["library","package","print","swift","tinu"],"created_at":"2024-10-24T11:43:13.892Z","updated_at":"2025-03-30T21:27:02.058Z","avatar_url":"https://github.com/ITzTravelInTime.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftLoggedPrint\n\nSwift Library for better prints and to log prints.\n\n## Usage\n\nThe source code is well documented, for some help here is some example usage:\n\n(See also the playground included with the project)\n\n```swift\n\nimport Foundation\nimport SwiftLoggedPrint\n\n//The usage of a subclass is recommended sice it allows for a shorter name in the code and to customize the prefix\nclass Log: LoggedPrinter{\n    override class var prefix: String{\n        return \"[My App]\"\n    }\n    \n    override class var debugPrefix: String{\n        return \"[Debug]\"\n    }\n}\n\nfor i in 0...1{\n    \nLog.displayPrintTime = i == 1 //The first time the log should display without the date, the second time with the date\nLog.trackPrintTime = i == 1 //The first time the log will not keep track of the time, the second time it will\n    \nLog.debug(\"This should print and be visible in the log\")\nLog.print(\"Hello this is my app!\") //this will print and show up in the log\n\nLog.allowsLogging = false\n\nLog.debug(\"This should print and not be visible in the log\")\nLog.print(\"Hello this is my app!\") //This will print and not show up in the log\n\nLog.enabled = false\n\nLog.print(\"This should not print and not be visible in the log\")\n\nLog.enabled = true\nLog.allowsLogging = true\n\n}\n\nLog.readLoggedDebugLines = false\n\nprint(\" ----- Here is the log so far [excluding debug lines]: \\n\\n\\(Log.readAllLog() ?? \"\")\")\n\nLog.readLoggedDebugLines = true\n\nprint(\" ---- Here is the log so far [with debug lines]: \\n\\n\\(Log.readAllLog() ?? \"\")\")\n\nprint(\" ---- Here is the RAW log so far: \\n\\n\\(Log.getCompleteLog().json(prettyPrinted: true) ?? \"\")\")\n\n```\n\n## Who should use this Library?\n\nThis library should be used by Swift apps/programs that needs better printing management compared to what Swift's Foundation library provvides and that needs some logs to provvide.\n\n## Requirements\n\nThis code should work for almost any platform/target that has the Swift Foundation library or any equivalent one that's named the same, and that provvides the same basic types and functionalities.\n\n## About the project\n\nThis code was created as part of my TINU project (https://github.com/ITzTravelInTime/TINU) and has been separated and made into it's own library to make the main project's source less complex and more focused on it's aim. \n\nAlso having this as it's own library allows for code to be updated separately and so various versions of the main TINU app will be able to be compiled all with the latest version of this library.\n## Libraries used\n\n- [ITzTravelInTime/SwiftPackagesBase](https://github.com/ITzTravelInTime/SwiftPackagesBase)\n\n## Credits\n\n - ITzTravelInTime (Pietro Caruso) - Project creator\n\n## Contacts\n\n - ITzTravelInTime (Pietro Caruso): piecaruso97@gmail.com\n\n## Legal info\n\nSwiftLoggedPrint: A library for logging and keeping track of prints and debug prints.\nCopyright (C) 2021-2022 Pietro Caruso\n\nThis library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\n\nThis library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitztravelintime%2Fswiftloggedprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitztravelintime%2Fswiftloggedprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitztravelintime%2Fswiftloggedprint/lists"}