HKLogger
is a powerful logging solution designed to empower developers in their debugging process. It offers a seamless alternative to traditional logging methods, providing enhanced features and flexibility. With HKLogger
, you can elevate your debugging experience by logging with various severity levels, log types, and additional metadata.
The goal is that you can streamline your debugging workflow, gain valuable insights, and accelerate the process of identifying and resolving issues in your iOS projects.
HKLogger
enables you to log with different severity levels, including info, debug, warning, and error. This granularity allows you to effectively prioritize and track down issues in your codebase.
The library supports a wide range of log types, such as debug, trace, networking, analytics, default, and health. This categorization helps you organize and filter logs based on their purpose, making it easier to focus on specific areas of your app.
If you use
Networking
type, we format the request and response from your endpoint into a JSON object, so you can view it more clearly in your logs.
HKLogger
goes beyond basic logging capabilities by allowing you to include additional metadata in your logs. You can effortlessly append contextual information like the file name, function, and line number where the log is generated. This added context greatly aids in pinpointing the exact location of issues.
- Thread where the log was generated
- File where the log was generated
- Function where the log was generated
- Line where the log was generated
HKLogger seamlessly integrates with Xcode's console, providing an intuitive interface for viewing your logs. It enriches the logging experience by adding icons corresponding to the severity level, making it effortless to identify and prioritize log entries.
- 2023-01-01T12:00:00 - [DEBUG] [HEALTH] Debug log
- 2023-01-01T12:00:00 - [INFO] [DEFAULT] ℹ️ Info log
- 2023-01-01T12:00:00 - [WARNING] [DEFAULT] ⚠️ Warning log
- 2023-01-01T12:00:00 - [ERROR] [DEFAULT] ❌ Error log
HKLogger offers the flexibility to store your logs in two ways.
- Save the log file directly on the physical device, which is particularly useful for debugging issues in production.
- Store the log file on the host machine running Xcode. This feature enables you to develop and execute your app while simultaneously viewing the log file on your Mac.
As a companion tool to HKLogger
, we are thrilled to present Mate, an innovative macOS application designed specifically for developers. Mate revolutionizes the way you interact with log files generated by HKLogger, providing a user-friendly interface that enhances your debugging workflow.
Please read Getting started guide document.
If you have any questions, feel free to post it in Q&A
In Xcode go to File > Add Packages. In the Search or Enter Package URL search box enter this URL: https://github.com/Houlak/hklogger
HKLogger
is an open source project. We want to create the best logging tool for iOS developers. Any feedback is welcome.
If you found a bug or want to request a new feature, we highly encourage you to do so by submitting an issue 👩💻👨💻