Defineconsolemethod