patched up logging, including parsing of raw input