Skip to content

Factory based instantiation + linux fixes

Compare
Choose a tag to compare
@jordanebelanger jordanebelanger released this 18 Nov 21:31
· 38 commits to master since this release
51fed78

Changes:

  • Fix crash related to @autoreleasepool on linux.
  • Fix log entries source location filepaths being fully logged, now only the relevant filepath information is logged.
  • Add a configuration file from which you can control if timestamps are logged to your log file or not.
  • Switch to a factory based instantiation system.

The bootstrapping now uses a factory and a config file, it looks like this:

try! StackdriverLogHandlerFactory.prepare(with: .init(logFilePath: "/var/log/my-app.log", 
                                                      defaultLogLevel: .debug,
                                                      logTimestamps: true))
LoggingSystem.bootstrap { label in
    return StackdriverLogHandlerFactory.make()
}