standardize debug logging to 'lifetime events'; add a simple command line interface