Refactored logging system in libdigitalscratch.