writeLog switched to using 'tag_name' instead of 'tagname', so we provide a fix for handling either case.