Merging in demur's changes
* Removed hard-coding of logging levels where possible
* Fixed bug where links to attachments in logging table did not work when WP is not installed in root of site

git-svn-id: https://plugins.svn.wordpress.org/document-gallery/trunk@983893 b8457f37-d9ea-0310-8a92-e5e31aec5664