After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 712829 - Silence unnecessary migration chatter on stdout
Silence unnecessary migration chatter on stdout
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-11-21 16:54 UTC by Colin Walters
Modified: 2013-11-21 22:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
registry-migrate-sources: Clean up error handling, avoid g_print() during bootup (8.01 KB, patch)
2013-11-21 16:54 UTC, Colin Walters
reviewed Details | Review

Description Colin Walters 2013-11-21 16:54:57 UTC
Currently we log a message every time the migrater starts, even
if we have nothing to migrate.  This clutters the systemd journal.

To fix this cleanly, rework this code so that error handling is
cleaner and more unified, which preserves the migration context.
Comment 1 Colin Walters 2013-11-21 16:54:59 UTC
Created attachment 260464 [details] [review]
registry-migrate-sources: Clean up error handling, avoid g_print() during bootup
Comment 2 Tristan Van Berkom 2013-11-21 20:49:06 UTC
I disagree with this particularly:

-	g_print ("Migrating addressbook sources from GConf...\n");
-

Migration is something that only happens when your actual addressbook 
data is migrated, this is valuable information to have in a system/session
log (not meaningless debug printing).

As you mentioned in your email, logs may have gone to /dev/null before,
on systems configured to send stdout/stderr to /dev/null.

It's great to hear that these logs won't be lost anymore.

It will be a loss of valuable code to be removing stdout logs of
normal successful operations when those are meaningful, and I hope
to discourage removal of code just for the sake of a less noisy
session logs, unless it's really appropriate (i.e. unless it's really
extreneous debug printing).

Beyond that, if meaningful logs of successful operation of EDS is not
desired in the log, then the logging mechanism can be configured to
ignore stdout.
Comment 3 Colin Walters 2013-11-21 20:51:27 UTC
(In reply to comment #2)
> I disagree with this particularly:
> 
> -    g_print ("Migrating addressbook sources from GConf...\n");

But note:

+		g_print ("Migrating %s from GConf...\n", migrate_type_name);
Comment 4 Tristan Van Berkom 2013-11-21 22:06:55 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I disagree with this particularly:
> > 
> > -    g_print ("Migrating addressbook sources from GConf...\n");
> 
> But note:
> 
> +        g_print ("Migrating %s from GConf...\n", migrate_type_name);

Ah, sorry I missed that.

I was reading into your comment on the mailing list:

  "Now, I read the journal *a lot*.  I'd really appreciate it (and
   administrators will too) if we just were...quieter.  When things are
   normal."

...a little too deeply, and wanted to check your intentions, without
doing it on list (also, I missed the replacement of that stdout).
Comment 5 Matthew Barnes 2013-11-21 22:18:10 UTC
Thanks for this.  Made some stylistic changes to the patch, but otherwise no objections.

Fixed for Evolution-Data-Server 3.11.3:
https://git.gnome.org/browse/evolution-data-server/commit/?id=07fa75f059e6bfd452298414ca5e9f7d1a63a340