npgsql/Npgsql — pull request #334 by roji (2014-09-06 15:16:07+00:00)
Title: Logging and localization makeover

Works on #279, with an additional cleanup on how localization is managed.

The first commit redoes logging with Common.Logging. This is an abstraction that allows consumers of libraries (such as Npgsql) to use whatever specific log framework they want (NLog, log4net...). It means we can now use all thefeatures of modern logging frameworks: priorities (debug/info/warning...), filter by the type emitting the log, exception logging, etc.

I'm not a huge fan of the Common.Logging solution since this adds an external dependency to Npgsql (the only one), but after some research on the subject I haven't found a satisfactory alternative. Any suggestion here would be welcome.

I've also cut down on a lot of logging messages which didn't seem helpful and were making ethe log unreadable (e.g. trace messages on every property getter). I may have been too violent, but these can always be added back based on our needs.

The second commit reorganizes the way we handle localized strings, it uses the standard VS resource management with code generation from the resx files, so Npgsql code references localized strings statically - cleaner and safer. Also I've grouped all the localizations rather than having one-file-per-type as before, which seemed like it added lots of resx files for no good reason.