Skip to content
jduquennoy edited this page Feb 29, 2016 · 5 revisions

How to use Log4swift

Including it in your project

Manually

  1. Copy the compiled Log4swift.framework in your project
  2. Add the library to the "Embedded Binaries" build phase
  3. Ensure the "EMBEDDED_CONTENT_CONTAINS_SWIFT" build setting (called "Embedded Content Contains Swift Code" in the UI is set to YES

Configuring the log system

Configuring the logging system means defining

  • The appenders and their formatters
  • The root logger
  • All additional loggers you may wish

Please see the general architecture section for more details on all those objects.

The logging system can be configured in two ways :

Both methods can be combined if needed.

General architecture

Log4swift's architecture that is similar in many points to log4j's one. It is base on a reduced set of objects :

See the dedicated pages for detailed explanation of how each object works :