CocoaLumberjack
CocoaLumberjack is a logging framework for Apple platforms (iOS, macOS, tvOS, watchOS, visionOS) that replaces NSLog with faster, more flexible logging. It supports multiple simultaneous log destinations (console, files, custom handlers) and integrates with Swift Package Manager, CocoaPods, and Carthage.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | CocoaLumberjack/CocoaLumberjack |
| Owner | CocoaLumberjack |
| Primary language | Objective-C |
| License | BSD-3-Clause — OSI-approved |
| Stars | 13.3k |
| Forks | 2.3k |
| Open issues | 6 |
| Latest release | 3.9.1 (2026-04-16) |
| Last updated | 2026-07-01 |
| Source | https://github.com/CocoaLumberjack/CocoaLumberjack |
What CocoaLumberjack is
A multi-threaded, dispatch-based logging framework written in Objective-C with Swift bindings. Supports dynamic log level configuration per file/logger, file rolling policies, and acts as a swift-log backend via DDLogHandler. Primary loggers include DDOSLogger (os_log), DDFileLogger, DDTTYLogger, and DDASLLogger.
Get the CocoaLumberjack source
Clone the repository and explore it locally.
git clone https://github.com/CocoaLumberjack/CocoaLumberjack.gitcd CocoaLumberjack# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Multiple import patterns depending on integration method: `@import CocoaLumberjack;` for frameworks, `#import <CocoaLumberjack/CocoaLumberjack.h>` otherwise, and `import CocoaLumberjack` for Swift.
- Known build issue: legacy Objective-C projects may encounter 'Multiple methods named tag' error; mitigate with `#define DD_LEGACY_MESSAGE_TAG 0` before import.
- Swift Package Manager integration requires explicit addition of both `CocoaLumberjack` and `CocoaLumberjackSwift` products to targets; SPM does not always auto-detect the dependency.
- File logger configuration (rolling frequency, max log files, compression) must be set explicitly; defaults are available but should be tuned for your app's disk and retention needs.
- Minimum deployment targets: iOS 11.0 documented; exact support for tvOS, watchOS, visionOS versions not specified—requires review for older OS versions.
When to avoid it — and what to weigh
- Pure Swift-only architecture — If your project is 100% Swift and you have no legacy Objective-C code, swift-log with a simpler backend may reduce complexity. CocoaLumberjack's Objective-C core adds some overhead.
- Simple, minimal logging needs — If your app only needs basic console output or simple file logging, the framework's configurability and performance may be overkill. os_log alone might suffice for iOS 10+.
- Server-side or non-Apple platforms — CocoaLumberjack is tightly integrated with Apple SDKs (Grand Central Dispatch, os_log, UIKit). Not suitable for server or non-Apple deployment targets.
- Strict license restrictions on Objective-C dependencies — If your project prohibits BSD-3-Clause licensed code, you cannot use CocoaLumberjack. Review your legal/compliance policies before adoption.
License & commercial use
BSD-3-Clause (BSD 3-Clause "New" or "Revised" License). A permissive OSI-approved license allowing use in commercial, proprietary, and closed-source software with attribution and liability disclaimer.
BSD-3-Clause is a permissive license. Commercial use is permitted. Ensure you provide a copy of the license and retain the original copyright notice in your distribution. No warranty is provided by the authors. Recommended: include CocoaLumberjack license in your app's legal notices or LICENSES directory.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
No explicit security claims made. Logging frameworks can inadvertently capture sensitive data (PII, credentials, auth tokens). Implement careful log filtering or sanitization if logging untrusted or sensitive input. File logger writes to local disk (typically app sandbox on iOS); ensure log files are not world-readable and are cleared appropriately. No information provided on encryption of log files at rest or in transit.
Alternatives to consider
os_log + unified logging (native Apple)
Built-in to iOS 10+. Simpler, no dependency. Lower overhead. Suitable if you don't need file persistence or multi-destination logging. Less granular control per file/logger.
swift-log (Apple's open-source logging API)
Swift-native, decoupled from specific backend. Works across platforms. Simpler for pure Swift code. Requires choosing a backend separately. CocoaLumberjack can be a backend, but pure swift-log + simpler backend may reduce complexity.
Glog / NSLog (legacy NSLog)
Minimal setup, no dependency. Extremely limited; slower, no file logging, no level control per file. Only a fallback for basic console output.
Build on CocoaLumberjack with DEV.co software developers
CocoaLumberjack is production-ready and actively maintained. Integrate via CocoaPods, Carthage, or Swift Package Manager today. See the Getting Started guide for step-by-step setup.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
CocoaLumberjack FAQ
Is CocoaLumberjack still actively maintained?
Can I use CocoaLumberjack in a commercial app?
Does CocoaLumberjack work with pure Swift?
What is the performance impact?
Custom software development services
DEV.co helps companies turn open-source tools like CocoaLumberjack into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source observability stack.
Ready to improve your app's logging?
CocoaLumberjack is production-ready and actively maintained. Integrate via CocoaPods, Carthage, or Swift Package Manager today. See the Getting Started guide for step-by-step setup.