jasonmc / forked-daapd

A re-write of the firefly media server (mt-daapd). It's released under GPLv2+. Please note that this git repository is a mirror of the official one at git://git.debian.org/~jblache/forked-daapd.git
http://blog.technologeek.org/2009/06/12/217
GNU General Public License v2.0
328 stars 45 forks source link

Poor Loggers #34

Open netmindz opened 13 years ago

netmindz commented 13 years ago

I'm just trying to tidy up some of the loggers as the following gives me no information at all really as to what is going on. One thing I have spotted while looking at this, is there appears to be quite a large amount of code in db.c that looks to be repeated. Forgive my ignorance with C, but is this actually required or can some of this not be re-factored to reduce repetition

[2011-03-05 21:05:08] db: No results [2011-03-05 21:05:08] db: No results [2011-03-05 21:05:08] db: No results [2011-03-05 21:05:09] db: No results [2011-03-05 21:05:09] db: No results [2011-03-05 21:05:09] db: No results [2011-03-05 21:05:09] db: No results [2011-03-05 21:05:10] db: No results [2011-03-05 21:05:10] db: No results [2011-03-05 21:05:10] db: No results [2011-03-05 21:05:10] db: No results [2011-03-05 21:05:10] db: No results [2011-03-05 21:05:11] db: No results [2011-03-05 21:05:11] db: No results [2011-03-05 21:05:11] db: No results [2011-03-05 21:05:11] db: No results [2011-03-05 21:05:12] db: No results [2011-03-05 21:05:12] db: No results [2011-03-05 21:05:12] db: No results [2011-03-05 21:05:12] db: No results [2011-03-05 21:05:13] db: No results [2011-03-05 21:05:13] db: No results [2011-03-05 21:05:13] db: No results [2011-03-05 21:05:13] db: No results [2011-03-05 21:05:14] db: No results [2011-03-05 21:05:14] db: No results

At the moment, there are no loggers that say "Added new file X" or similar which makes things rather confusing, just some of the "No results" queries mean, didn't find reference to this file path, so therefore insert new record

netmindz commented 13 years ago

Also, the code appears not to be indented correctly. Any chance of doing a format on the code please ?