WrkstrmLog
is a versatile and flexible logging framework designed for consistent logging across different environments including Linux, Xcode, and macOS terminal. It adapts to various contexts, ensuring that log messages are displayed with consistent formatting regardless of the platform.
- 🌐 Adaptive Logging: Seamless logging across Linux, Xcode, and macOS terminal environments.
- 💼 Multiple Logging Styles: Choose from print, OSLog, and SwiftLog styles.
- 🔧 Flexible and Customizable: Extend the framework to fit specific logging requirements.
- 🚀 Easy Integration: Quick setup with Swift Package Manager.
- macOS
- Linux
To integrate WrkstrmLog
into your project, follow these steps:
Add WrkstrmLog
as a dependency in your Package.swift
file:
dependencies: [
.package(url: "https://github.com/wrkstrm/WrkstrmLog.git", .upToNextMajor(from: "0.0.0"))
]
Include WrkstrmLog
in your target dependencies:
targets: [
.target(name: "YourTarget", dependencies: ["WrkstrmLog"]),
]
Import WrkstrmLog
and start logging with ease:
-
📥 Import the Library:
import WrkstrmLog
-
🔨 Initialize Logger: Create a logger instance with your system and category:
let logger = Log(system: "YourSystem", category: "YourCategory")
-
📝 Log Messages: Use various logging methods like
verbose
,info
,error
, andguard
:logger.verbose("Verbose message") logger.info("Info message") logger.error("Error message") Log.guard("Critical error")
WrkstrmLog
offers high customization capabilities. Extend or modify it to suit your project's needs, and utilize the sample formatters as a foundation for custom implementations.
🌟 Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
📄 Distributed under the MIT License. See LICENSE
for more information.
🔗 Project Link: https://github.com/wrkstrm/WrkstrmLog
- Developed by github.com/@rismay