add a return value to RegisterAppenderType, then we can use the func in var block