Closed Bug 1136294 (ioslogging) Opened 10 years ago Closed 10 years ago

Integrate logging library, expose logs to user, and allow for sharing logs

Categories

(Firefox for iOS :: Build & Test, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nalexander, Assigned: jhugman)

References

Details

(Keywords: meta)

Attachments

(1 file, 1 obsolete file)

One of the early decisions rnewman made that has really paid of for the Android Background Services team is to log everything (when desired). We are careful to cache log levels so we don't destroy performance, but in general we log enough to re-create most flows in their entirety. We've never exposed those logs in a more friendly way than by using |adb logcat| and filters, so we haven't got the full benefit. I think this was a mistake: we should have made it easier to view and share logs for subsystems without needing |adb logcat|. I would like to: * integrate and use a logging library; * expose logs to the user (perhaps only for some builds, or when some settings are toggled); * and allow for sharing of logs. The consensus favourite logging library for Swift appears to be https://github.com/DaveWoodCom/XCGLogger but I could be swayed.
Alias: ioslogging
Some considerations: * we need to be very careful not to expose Personally Identifying Information in logs; * we need to rotate logs, so that we don't consume too much device space.
Keywords: meta
rnewman, stefan, wesj, bnicholson, mfinkle: if you have an opinion, please chime in. I want this for the FxA sign-in/sign-up flow and am volunteering to do something quick for my own purposes.
Flags: needinfo?(wjohnston)
Flags: needinfo?(stefanh)
Flags: needinfo?(rnewman)
Flags: needinfo?(mark.finkle)
Flags: needinfo?(bnicholson)
That library looks good. If we log to ~/Documents/Logs/ then it is simply to copy logs off the device with iTunes or Xcode. My only wish is that the library also supports logging to the console, visible in the Xcode console pane when running the app.
I'm glad you're taking this...adding a proper logging library has been on my backlog for awhile. +1 from me.
Flags: needinfo?(bnicholson)
Clearing info for stefanh@inbox.com. Wrong stefan ;)
Flags: needinfo?(stefanh)
+1 from me
Flags: needinfo?(mark.finkle)
Looks good to me too. Lets try!
Flags: needinfo?(wjohnston)
Assignee: nobody → jhugman
Attachment #8572791 - Flags: review?(sarentz)
Attachment #8572791 - Flags: review?(bnicholson)
(In reply to James Hugman [:jhugman] [@jhugman] from comment #8) > https://github.com/mozilla/firefox-ios/pull/192 James, please add PRs as a patch to the bug and then set one or two reviewers. I've done that already for this one. Just one quick comment that I added on Github and then we can merge this.
Attached file Pull request
Updating to point to the new PR.
Attachment #8572791 - Attachment is obsolete: true
Attachment #8572791 - Flags: review?(sarentz)
Attachment #8572791 - Flags: review?(bnicholson)
Attachment #8574117 - Flags: review?(sarentz)
Attachment #8574117 - Flags: review?(bnicholson)
Looks like a good starting point.
Flags: needinfo?(rnewman)
https://github.com/mozilla/firefox-ios/pull/192 Now has something which appears to be merging now. st3fan Please could you have a look?
Flags: needinfo?(sarentz)
(In reply to James Hugman [:jhugman] [@jhugman] from comment #13) > https://github.com/mozilla/firefox-ios/pull/192 Now has something which > appears to be merging now. st3fan Please could you have a look? https://github.com/mozilla/firefox-ios/pull/201
Merged this in.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(sarentz)
Resolution: --- → FIXED
Comment on attachment 8574117 [details] [review] Pull request Thought I already +d this since I merged this patch yesterday.
Attachment #8574117 - Flags: review?(sarentz) → review+
Comment on attachment 8574117 [details] [review] Pull request We never removed the explicit version from Cartfile, so I guess we can address that in a follow-up.
Attachment #8574117 - Flags: review?(bnicholson)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: