{"action":"created","issue":{"url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/issues/68","labels_url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/issues/68/comments","events_url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/issues/68/events","html_url":"https://github.com/DaveWoodCom/XCGLogger/pull/68","id":91869598,"number":68,"title":"Update XCGConsoleLogDestination for easier subclassing","user":{"login":"msanders","id":54970,"avatar_url":"https://avatars.githubusercontent.com/u/54970?v=3","gravatar_id":"","url":"https://api.github.com/users/msanders","html_url":"https://github.com/msanders","followers_url":"https://api.github.com/users/msanders/followers","following_url":"https://api.github.com/users/msanders/following{/other_user}","gists_url":"https://api.github.com/users/msanders/gists{/gist_id}","starred_url":"https://api.github.com/users/msanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msanders/subscriptions","organizations_url":"https://api.github.com/users/msanders/orgs","repos_url":"https://api.github.com/users/msanders/repos","events_url":"https://api.github.com/users/msanders/events{/privacy}","received_events_url":"https://api.github.com/users/msanders/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-29T18:06:59Z","updated_at":"2015-07-07T19:08:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/pulls/68","html_url":"https://github.com/DaveWoodCom/XCGLogger/pull/68","diff_url":"https://github.com/DaveWoodCom/XCGLogger/pull/68.diff","patch_url":"https://github.com/DaveWoodCom/XCGLogger/pull/68.patch"},"body":"Changes:\r\n- Moved print calls to output method.\r\n- Added flag to turn off date formatting.\r\n\r\nThis is most helpful when integrating with Crashlytics. E.g.:\r\n\r\n```swift\r\npublic class CrashlyticsLogDestination: XCGConsoleLogDestination {\r\n    override public init(owner: XCGLogger, identifier: String) {\r\n        super.init(owner: owner, identifier: identifier)\r\n        showDate = false\r\n    }\r\n\r\n    override public func output(text: String) {\r\n        let args: [CVarArgType] = [text]\r\n        withVaList(args) { (argp: CVaListPointer) -> Void in\r\n            #if DEBUG\r\n                CLSNSLogv(\"%@\", argp)\r\n            #else\r\n                CLSLogv(\"%@\", argp)\r\n            #endif\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nThen in the app delegate (or wherever setup happens):\r\n```swift\r\nlog.setup(/* ... */)\r\nlog.removeLogDestination(XCGLogger.constants.baseConsoleLogDestinationIdentifier)\r\nlog.addLogDestination(CrashlyticsLogDestination(owner: log, identifier: \"Crashlytics\"))\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/issues/comments/119306296","html_url":"https://github.com/DaveWoodCom/XCGLogger/pull/68#issuecomment-119306296","issue_url":"https://api.github.com/repos/DaveWoodCom/XCGLogger/issues/68","id":119306296,"user":{"login":"amol-c","id":2050256,"avatar_url":"https://avatars.githubusercontent.com/u/2050256?v=3","gravatar_id":"","url":"https://api.github.com/users/amol-c","html_url":"https://github.com/amol-c","followers_url":"https://api.github.com/users/amol-c/followers","following_url":"https://api.github.com/users/amol-c/following{/other_user}","gists_url":"https://api.github.com/users/amol-c/gists{/gist_id}","starred_url":"https://api.github.com/users/amol-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amol-c/subscriptions","organizations_url":"https://api.github.com/users/amol-c/orgs","repos_url":"https://api.github.com/users/amol-c/repos","events_url":"https://api.github.com/users/amol-c/events{/privacy}","received_events_url":"https://api.github.com/users/amol-c/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T19:08:46Z","updated_at":"2015-07-07T19:08:46Z","body":"This looks very useful !"}}