@Test public void getLog() throws Exception { Assert.assertNotNull(LogCodes.getLog(LogCodes.ERROR_RPC_LOG_LOAD)); }
public static String getLog(String code) { if (!LOG_CODES.containsKey(code)) { LOGGER.error(CODE_DOES_NOT_EXIST + code); return CODE_DOES_NOT_EXIST + code; } try { return String.format(LOG, code, LOG_CODES.get(code), LogCodes.NOTE); } catch (Throwable e) { LOGGER.error(LOG_FORMAT_ERROR + code, e); } return LOG_FORMAT_ERROR + code; }
LogCodes { public static String getLog(String code) { if (!LOG_CODES.containsKey(code)) { LOGGER.error(CODE_DOES_NOT_EXIST + code); return CODE_DOES_NOT_EXIST + code; } try { return String.format(LOG, code, LOG_CODES.get(code), LogCodes.NOTE); } catch (Throwable e) { LOGGER.error(LOG_FORMAT_ERROR + code, e); } return LOG_FORMAT_ERROR + code; } }
LogCodes { public static String getLog(String code) { if (!LOG_CODES.containsKey(code)) { LOGGER.error(CODE_DOES_NOT_EXIST + code); return CODE_DOES_NOT_EXIST + code; } try { return String.format(LOG, code, LOG_CODES.get(code), LogCodes.NOTE); } catch (Throwable e) { LOGGER.error(LOG_FORMAT_ERROR + code, e); } return LOG_FORMAT_ERROR + code; }  }
LogCodes { public static String getLog(String code) { if (!LOG_CODES.containsKey(code)) { LOGGER.error(CODE_DOES_NOT_EXIST + code); return CODE_DOES_NOT_EXIST + code; } try { return String.format(LOG, code, LOG_CODES.get(code), LogCodes.NOTE); } catch (Throwable e) { LOGGER.error(LOG_FORMAT_ERROR + code, e); } return LOG_FORMAT_ERROR + code; }  static void init(String filename); static String getLog(String code); static String getLiteLog(String codeOrMsg); static String getLog(String code, Object... messages); static String getLiteLog(String codeOrMsg, Object... messages); }
LogCodes { public static String getLog(String code) { if (!LOG_CODES.containsKey(code)) { LOGGER.error(CODE_DOES_NOT_EXIST + code); return CODE_DOES_NOT_EXIST + code; } try { return String.format(LOG, code, LOG_CODES.get(code), LogCodes.NOTE); } catch (Throwable e) { LOGGER.error(LOG_FORMAT_ERROR + code, e); } return LOG_FORMAT_ERROR + code; }  static void init(String filename); static String getLog(String code); static String getLiteLog(String codeOrMsg); static String getLog(String code, Object... messages); static String getLiteLog(String codeOrMsg, Object... messages); static final String CODE_DOES_NOT_EXIST; static final String LITE_LOG_FORMAT_ERROR; static final String LOG_FORMAT_ERROR; static final String INFO_ROUTE_REGISTRY_PUB; static final String INFO_ROUTE_REGISTRY_UNPUB; static final String INFO_ROUTE_REGISTRY_PUB_START; static final String INFO_ROUTE_REGISTRY_PUB_OVER; static final String ERROR_PROVIDER_TARGET_NULL; static final String ERROR_PROVIDER_TARGET_REGISTERED; static final String ERROR_PROXY_PUBLISH_FAIL; static final String ERROR_PROXY_PRE_UNPUBLISH_FAIL; static final String ERROR_PROXY_POST_UNPUBLISH_FAIL; static final String LOCALFILEREGISTRY_FAIL_WRITECONFLICT; static final String ERROR_SERVICE_PUBLISHING; static final String ERROR_SERVICE_UNPUBLISHING; static final String ERROR_ROUTE_ADDRESS_SUBTOKEN_DECRY; static final String ERROR_DUPLICATE_PROVIDER_CONFIG; static final String WARN_DUPLICATE_PROVIDER_CONFIG; static final String ERROR_REGISTER_PROCESSOR_TO_SERVER; static final String ERROR_BUILD_PROVIDER_PROXY; static final String ERROR_REFERENCE_AND_INTERFACE; static final String ERROR_SERVER_EMPTY; static final String ERROR_REGISTER_TO_REGISTRY; static final String ERROR_PROVIDER_ATTRIBUTE_COMPARE; static final String ERROR_PROVIDER_ATTRIBUTE_CHANGE; static final String ERROR_CONVERT_URL; static final String ERROR_START_SERVER; static final String ERROR_START_BOLT_SERVER; static final String ERROR_OVERLOADING_METHOD; static final String ERROR_GET_PROXY_CLASS; static final String ERROR_START_SERVER_WITH_PORT; static final String ERROR_HTTP2_BIND; static final String ERROR_STOP_SERVER_WITH_PORT; static final String ERROR_UNREG_PROCESSOR; static final String INFO_ADDRESS_WAIT_START; static final String INFO_ADDRESS_WAIT_OVER; static final String INFO_ROUTE_REGISTRY_SUB; static final String INFO_ROUTE_REGISTRY_UNSUB; static final String WARN_BINDING_ADDRESS_WAIT_TIME; static final String WARN_CONSUMER_NOT_PERMIT; static final String ERROR_STANDALONE_APPNAME_CHECK_FAIL; static final String ERROR_STANDALONE_REFER_GENERIC_CHECK_FAIL; static final String ERROR_PROXY_CONSUME_FAIL; static final String ERROR_PROXY_UNCOSUME_FAIL; static final String ERROR_INIT_METHOD_SPECIAL; static final String WARN_PROCESS_ADDRESS_WAIT; static final String WARN_PROCESS_ADDRESS_WAIT_CONTINUE; static final String ERROR_DUPLICATE_CONSUMER_CONFIG; static final String ERROR_BUILD_CONSUMER_PROXY; static final String ERROR_SUBSCRIBE_FROM_REGISTRY; static final String ERROR_CONSUMER_ATTRIBUTE_COMPARING; static final String ERROR_CONSUMER_ATTRIBUTE_CHANGE; static final String ERROR_CONSUMER_REFER_AFTER_CHANGE; static final String ERROR_SWITCH_CLUSTER_NEW; static final String WARN_SWITCH_CLUSTER_DESTROY; static final String ERROR_START_CLIENT; static final String ERROR_METRIC_REPORT_ERROR; static final String ERROR_TRACER_INIT; static final String ERROR_FILTER_CONSTRUCT; static final String ERROR_CREATE_EXT_INSTANCE; static final String ERROR_EXTENSION_CLASS_NULL; static final String ERROR_EXTENSION_NOT_FOUND; static final String ERROR_LOAD_EXT; static final String ERROR_GUICE_MODULE_CANNOT_FOUND; static final String ERROR_ROUTE_ADDRESS_HANDLER_NULL; static final String ERROR_ROUTE_ADDRESS_HANDLER_REGISTERED; static final String ERROR_ROUTE_ADDRESS_HANDLERS_NULL; static final String ERROR_ROUTE_ADDRESS_PHASE_EXIST; static final String INFO_ROUTE_REGISTRY_URLS_HANDLE; static final String LOCALFILEREGISTRY_WRITE_FILEOVER; static final String INFO_REGISTRY_IGNORE; static final String LOCALFILEREGISTRY_FAIL_READFILE; static final String ERROR_RPC_NETWORK_ADDRESS_LOAD; static final String ERROR_DESTRORY_REGISTRY; static final String ERROR_REG_PROVIDER; static final String ERROR_UNREG_PROVIDER; static final String ERROR_SUB_PROVIDER; static final String ERROR_UNSUB_LISTENER; static final String ERROR_SUB_PROVIDER_CONFIG; static final String ERROR_SUB_PROVIDER_OVERRIDE; static final String ERROR_UNSUB_PROVIDER_CONFIG; static final String ERROR_REG_CONSUMER_CONFIG; static final String ERROR_UNREG_CONSUMER_CONFIG; static final String ERROR_UNSUB_CONSUMER_CONFIG; static final String ERROR_LOCAL_FILE_NULL; static final String ERROR_HEALTH_CHECK_URL; static final String ERROR_ZOOKEEPER_CLIENT_UNAVAILABLE; static final String ERROR_ZOOKEEPER_CLIENT_START; static final String ERROR_EMPTY_ADDRESS; static final String ERROR_INIT_NACOS_NAMING_SERVICE; static final String ERROR_READ_BACKUP_FILE; static final String ERROR_CHECK_PASS; static final String ERROR_WATCH_HEALTH; static final String ERROR_CLOSE_PATH_CACHE; static final String ERROR_INVALID_ATTRIBUTE; static final String ERROR_REGISTRY_NOT_SUPPORT; static final String ERROR_REGISTRY_INIT; static final String ERROR_PROXY_CONSTRUCT; static final String INFO_TRANSMIT_INIT_FINISH; static final String INFO_TRANSMIT_URLS_HANDLE; static final String ERROR_TRANSMIT_PARSE; static final String ERROR_TRANSMIT_PARSE_APPNAME; static final String ERROR_TRANSMIT_PARSE_CONFIG; static final String ERROR_TRANSMIT_PARSE_URL; static final String ERROR_TRANSMIT; static final String ERROR_RPC_EVENT_HANDLE_ERROR; static final String ERROR_CE_SERVER_STARTED_LISTENER_ERROR; static final String INFO_ACTIVATOR_START; static final String INFO_ACTIVATOR_END; static final String INFO_GET_CONFIG_DEFAULT_APP; static final String INFO_GET_CONFIG_PROPERTY; static final String ERROR_PROXY_BINDING_CLASS_CANNOT_FOUND; static final String ERROR_PROVIDER_TR_START; static final String ERROR_PROVIDER_TR_STOP; static final String WARN_PROVIDER_CUT_CAUSE; static final String WARN_PROVIDER_STOPPED; static final String ERROR_SOFA_FRAMEWORK_INVALID; static final String ERROR_RPC_LOG_LOAD; static final String ERROR_RPC_CONFIG_LOAD; static final String ERROR_APPLICATION_CONTEXT_NULL; static final String ERROR_OSGI_BUNDLECONTEXT_NULL; static final String ERROR_OSGI_RESGISTER_SERVICE; static final String ERROR_OSGI_UNRESGISTER_SERVICE; static final String ERROR_ADDRESSING_CHAIN_EMPTY; static final String ERROR_PROVIDER_TRIPLE_START; static final String ERROR_RESTART_SCHEDULE_SERVICE; static final String ERROR_GET_HOST_FAIL; static final String ERROR_LOAD_RPC_CONFIGS; static final String ERROR_NOT_FOUND_KEY; static final String ERROR_BIND_PORT_ERROR; static final String ERROR_HOST_NOT_FOUND; static final String ERROR_QUERY_ATTRIBUTE; static final String ERROR_UPDATE_ATTRIBUTE; static final String ERROR_SERVER_PROTOCOL_NOT_SUPPORT; static final String INFO_PROCESS_PROFILER_CLIENT_INVOKE; static final String INFO_PROCESS_PROVIDER_TR_IN; static final String INFO_PROCESS_PROVIDER_TR_OUT; static final String ERROR_RESPONSE_FUTURE_NULL; static final String ERROR_RESPONSE_FUTURE_NOT_CLEAR; static final String WARN_PROCESS_PARSE_TARGET_METHOD; static final String ERROR_LOAD_CLUSTER; static final String ERROR_DESTORY_ALL_TRANSPORT; static final String ERROR_BUILD_PROXY; static final String ERROR_GET_CONNECTION; static final String ERROR_INIT_PROVIDER_TRANSPORT; static final String ERROR_CHECK_ALIVE_PROVIDER; static final String ERROR_CLIENT_DESTROYED; static final String ERROR_CLOSE_CONNECTION; static final String ERROR_CATCH_EXCEPTION; static final String INFO_CONNECT_PUT_TO_ALIVE; static final String INFO_CONNECT_PUT_TO_RETRY; static final String INFO_CONNECT_RETRY_START; static final String INFO_CONNECT_RETRY_SUCCES; static final String INFO_CONNECT_RETRY_REMOVE; static final String INFO_CONNECT_ALIVE_REMOVE; static final String INFO_NEGOTIATION_RESULT; static final String ERROR_INVOKE_GET_CLIENT; static final String ERROR_TARGET_URL_INVALID; static final String LOCALFILEREGISTRY_FAIL_INVOKE; static final String ERROR_NOTIFY_CONSUMER_STATE_UN; static final String WARN_NOTIFY_CONSUMER_STATE; static final String ERROR_UPDATE_PROVIDERS; static final String ERROR_DELETE_PROVIDERS; static final String ERROR_LOAD_CONNECTION_HOLDER; static final String ERROR_LOAD_LOAD_BALANCER; static final String WARN_DESERIALIZE_HEADER_ERROR; static final String ERROR_DECODE_REQ_CLASS_CANNOT_FOUND; static final String ERROR_DECODE_RES_CLASS_CANNOT_FOUND; static final String ERROR_DECODE_REQ_PROTOCOL_INVALID; static final String ERROR_DECODE_RES_PROTOCOL_INVALID; static final String ERROR_DECODE_CLASS_NOT_FOUND; static final String ERROR_COMPRESSOR_NOT_FOUND; static final String ERROR_SERIALIZER_NOT_FOUND; static final String ERROR_SERIALIZER; static final String ERROR_UNSUPPORTED_SERIALIZE_TYPE; static final String ERROR_UNSUPPORTED_CONTENT_TYPE; static final String ERROR_ONLY_ONE_PARAM; static final String ERROR_PROTOBUF_RETURN; static final String ERROR_METHOD_NOT_FOUND; static final String ERROR_VOID_RETURN; static final String ERROR_UNSUPPORT_TYPE; static final String ERROR_NO_AVAILBLE_PROVIDER; static final String LOCALFILEREGISTRY_FAIL_READURL; static final String ERROR_LOAD_ADDRESS_HOLDER; static final String ERROR_ATTACHMENT_KEY; static final String ERROR_ASYNC_THREAD_POOL_REJECT; static final String ERROR_TRACER_UNKNOWN_EXP; static final String ERROR_FAIL_LOAD_TRACER_EXT; static final String ERROR_TRACER_CONSUMER_STACK; static final String ERROR_TRACER_PROVIDER_STACK; static final String ERROR_LOOKOUT_PROCESS; static final String INFO_SERVICE_METADATA_IS_NULL; static final String WARN_CANNOT_FOUND_SERVICE_4_SERVER; static final String ERROR_SERVICE_INTERFACE_CANNOT_FOUND; static final String ERROR_CANNOT_FOUND_SERVICE_4_CLIENT; static final String ERROR_INVOKE_TIMEOUT; static final String ERROR_INVOKE_TIMEOUT_NO_TARGET; static final String ERROR_INVOKE_NO_TR_INVOKE_SERVICE; static final String ERROR_PROVIDER_TR_POOL_REJECTION; static final String ERROR_PROVIDER_TR_POOL_FULL; static final String ERROR_PROVIDER_SERVICE_CANNOT_FOUND; static final String ERROR_PROVIDER_SERVICE_METHOD_CANNOT_FOUND; static final String ERROR_PROVIDER_PROCESS; static final String ERROR_DECODE_REQ_SIG_CLASS_NOT_FOUND; static final String ERROR_DISCARD_TIMEOUT_REQUEST; static final String ERROR_DISCARD_TIMEOUT_RESPONSE; static final String ERROR_UNSUPPORTED_PROTOCOL; static final String ERROR_GET_SERVER; static final String ERROR_DESTROY_SERVER; static final String ERROR_PROCESS_UNKNOWN; static final String ERROR_PROTOCOL_NOT_FOUND; static final String ERROR_NEXT_FILTER_AND_INVOKER_NULL; static final String ERROR_NEED_DECODE_METHOD; static final String INFO_REGULATION_ABNORMAL; static final String INFO_REGULATION_ABNORMAL_NOT_DEGRADE; static final String WARN_SUCCESS_BY_RETRY; static final String ERROR_ORIGIN_WEIGHT_ZERO; static final String ERROR_WHEN_DO_MEASURE; static final String ERROR_WHEN_DO_REGULATE; static final String ERROR_HYSTRIX_FALLBACK_FAIL; static final String LOCALFILEREGISTRY_FAIL_WRITEFILE; }