Closed Bug 1183695 Opened 9 years ago Closed 9 years ago

Save sync logs on disk

Categories

(Firefox for iOS :: Sync, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: rnewman, Assigned: sleroux)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

The short-term part of Bug 1182350.
Steph, wanna steal this?

This'll be a little bit of XCGLogger rewiring as we start and end a sync in Profile.swift, flushing to a file in a directory.
Flags: needinfo?(sleroux)
Yup I can take this. Looks like XCGLogger already handles writing logs to disk so we can just add the file logger alongside the console logger and we should be good to go.
Flags: needinfo?(sleroux)
Do we want to write all console log messages to disk or are we only looking for logging performing in Profile.swift?
Flags: needinfo?(rnewman)
Everything in Sync, Storage, FxA, Profile.

Probably that means introducing two loggers -- one for browserish things, and one for storageish things.
Flags: needinfo?(rnewman)
An easy first step is to log everything to disk, of course :)
Assignee: rnewman → sleroux
I've started with a generic app logger that will log everything to an app.log file for now.
Attachment #8643226 - Flags: review?(rnewman)
Comment on attachment 8643226 [details] [review]
PR https://github.com/mozilla/firefox-ios/pull/862

Two comments on the PR.
Attachment #8643226 - Flags: review?(rnewman)
Are we cleaning up the logs at some point?
See comment about log rolling. The current PR doesn't keep logs for longer than the last browser lifespan, so there's nothing to clean up.
Attachment #8643226 - Attachment is obsolete: true
Wrote patch to use rolling logger for sync logs and separate loggers for browser/keychain logging.
Attachment #8644486 - Flags: review?(rnewman)
Still needs tests and adjustments
I've updated the PR to include the better way of getting folder size and nit fixes: https://github.com/mozilla/firefox-ios/commit/d456246a2b8a4a11ccbf82c4c35b79cf4c7ddef5
I've contacted Nikolai about the licensing and he's fine with licensing it under MPL2.0:

https://github.com/NikolaiRuhe/NRFoundation/issues/2

> Hi Stephan!
> I hereby grant you the right to use and redistribute my code from NRFileManager using MPL2.0.
> Is that OK for your purpose?
> Hope I could help :)
bafb839
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 1192637
Attachment #8644486 - Flags: review?(rnewman)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: