Improve logging at INFO level

Bug #578248 reported by Natalia Bidart on 2010-05-10
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-1-2
High
Natalia Bidart
Trunk
High
Natalia Bidart
ubuntuone-client (Ubuntu)
High
dobey
Lucid
Undecided
Unassigned

Bug Description

Current logging for INFo level is not good enough to diagnose file/dir deletion. We need to improve this by:

- Sync must log the 'Calling' message plus the event that was processed and that generated the call.

- Log in INFO the FS_(DIR|FILE)_DELETE events coming from pyinotify.

---------------------------------

TEST CASE:

 * having the syncdaemon without debug mode on for logs, when deleting a sycnhed file and without this fix, in the log you can only see:

2010-05-11 10:53:09,847 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - ['-'::'-'] ''/home/nessita/Ubuntu One/work/weekly-report.txt.copy'' | Called delete_on_server (In: T:NONE:F)
2010-05-11 10:53:14,666 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - [''::'b9bf33b5-af86-469b-8182-a47fc00fe2fd'] ''-'' | Called remove_trash (In: F:NA:NA)

 * when running the syncdaemon with this fix, when removing a synched file, in the log you can now see:

2010-05-11 12:19:22,971 - ubuntuone.SyncDaemon.EQ - INFO - push_event: FS_FILE_DELETE, args:('/home/nessita/Ubuntu One/work/weekly-report.txt.last',), kw:{}
2010-05-11 12:19:22,973 - ubuntuone.SyncDaemon.sync - INFO - T:NONE:F 1f4a1998-e08a-4525-9780-14905b63a62f ['root'::'8af85318-ceae-4dec-9b58-cf44cb2f964b'] ''Ubuntu One/work/weekly-report.txt.last'' | Calling delete_on_server (got FS_FILE_DELETE:{})
2010-05-11 12:19:22,979 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - ['-'::'-'] ''/home/nessita/Ubuntu One/work/weekly-report.txt.last'' | Called delete_on_server (In: T:NONE:F)
2010-05-11 12:19:38,540 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - [''::'8af85318-ceae-4dec-9b58-cf44cb2f964b'] ''-'' | Calling remove_trash (got AQ_UNLINK_OK:{})
2010-05-11 12:19:38,541 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - [''::'8af85318-ceae-4dec-9b58-cf44cb2f964b'] ''-'' | Called remove_trash (In: F:NA:NA)

Related branches

Changed in ubuntuone-client:
importance: Undecided → High
assignee: nobody → Naty Bidart (nataliabidart)
status: New → In Progress
tags: added: foundations+ sru u1-lucid
tags: added: u1-lucid-sru
removed: sru u1-lucid
Changed in ubuntuone-client (Ubuntu):
status: New → Triaged
Changed in ubuntuone-client (Ubuntu):
assignee: nobody → Rodney Dawes (dobey)
Changed in ubuntuone-client (Ubuntu):
importance: Undecided → High
Changed in ubuntuone-client (Ubuntu):
status: Triaged → Confirmed
Changed in ubuntuone-client (Ubuntu):
status: Confirmed → Triaged
Natalia Bidart (nataliabidart) wrote :

TEST CASE:

 * having the syncdaemon without debug mode on for logs, when deleting a sycnhed file and without this branch, in the log you can only see:

2010-05-11 10:53:09,847 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - ['-'::'-'] ''/home/nessita/Ubuntu One/work/weekly-report.txt.copy'' | Called delete_on_server (In: T:NONE:F)
2010-05-11 10:53:14,666 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - [''::'b9bf33b5-af86-469b-8182-a47fc00fe2fd'] ''-'' | Called remove_trash (In: F:NA:NA)

 * when running the syncdaemon within this branch, when removing a synched file, in the log you can now see:

2010-05-11 12:19:22,971 - ubuntuone.SyncDaemon.EQ - INFO - push_event: FS_FILE_DELETE, args:('/home/nessita/Ubuntu One/work/weekly-report.txt.last',), kw:{}
2010-05-11 12:19:22,973 - ubuntuone.SyncDaemon.sync - INFO - T:NONE:F 1f4a1998-e08a-4525-9780-14905b63a62f ['root'::'8af85318-ceae-4dec-9b58-cf44cb2f964b'] ''Ubuntu One/work/weekly-report.txt.last'' | Calling delete_on_server (got FS_FILE_DELETE:{})
2010-05-11 12:19:22,979 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - ['-'::'-'] ''/home/nessita/Ubuntu One/work/weekly-report.txt.last'' | Called delete_on_server (In: T:NONE:F)
2010-05-11 12:19:38,540 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - [''::'8af85318-ceae-4dec-9b58-cf44cb2f964b'] ''-'' | Calling remove_trash (got AQ_UNLINK_OK:{})
2010-05-11 12:19:38,541 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - [''::'8af85318-ceae-4dec-9b58-cf44cb2f964b'] ''-'' | Called remove_trash (In: F:NA:NA)

description: updated
Changed in ubuntuone-client (Ubuntu):
milestone: none → lucid-updates
Changed in ubuntuone-client:
status: In Progress → Fix Committed

Accepted ubuntuone-client into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ubuntuone-client (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Joshua Hoover (joshuahoover) wrote :

Test case passed with 1.2.2-0ubuntu2 proposed installed and syncdaemon logging level set to INFO.

Martin Pitt (pitti) wrote :

Since it was fixed in trunk a while ago, I assume that maverick's current version (1.3.2) has the fix as well. Closing all the maverick tasks.

Changed in ubuntuone-client (Ubuntu):
status: Triaged → Fix Released
tags: added: verification-done
removed: verification-needed
Martin Pitt (pitti) wrote :

ubuntuone-client (1.2.2-0ubuntu1) lucid-proposed; urgency=low

  * New upstream release.
    - Properly handle valid UTF-8 non-ASCII names for UDFs (LP: #557160)
    - Fix nautilus crash when running u1sdtool --subscribe-folder (LP: #570261)
    - Cannot reactivate "File sync" on services tab (LP: #570721)
    - Retry interrupted uploads (LP: #575817)
    - Improve logging at INFO level (LP: #578248)
    - u1sdtool --delete-folder with invalid id hangs (LP: #583412)
    - ubuntuone-syncdaemon crashed with OSError (LP: #452682)
    - ubuntuone-preferences "Got empty result for devices list." (LP: #576263)
  * Rmmove fix-571548.patch and fix-567223.patch; included upstream now.
 -- Rodney Dawes <email address hidden> Wed, 16 Jun 2010 13:42:32 -0400

Changed in ubuntuone-client (Ubuntu Lucid):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers