add logging solution

basically taken wholesale from backdrop admin