making the logs consistent with gcp implementation
All Submissions:
- [YES/NO] I have added an explanation of what changes in this merge do and why we should include it?: YES
- [YES/NO] I have updated the documentation accordingly.: NA
- [YES/NO/NA] I have added tests to cover my changes. : NA
- [YES/NO/NA] All new and existing tests passed. YES
- [YES/NO/NA] My code follows the code style of this project. YES
- [YES/NO/NA] I ran lint checks locally prior to submission. NA
What is the issue or story related to the change?
Making the log messages consistent with what we have in GCP implementation
High level design:
Issue:
Change details: here is line by line comparison of logs added in both the CSP implementations:
AZURE IMPLEMENTATOIN
=======================
D:\OSDURepos2\schema-service\provider\schema-azure\src\main>findstr /s /i "log." *.java
AzureAuthorityStore.java: log.warning(SchemaConstants.AUTHORITY_EXISTS_ALREADY_REGISTERED);
AzureAuthorityStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
AzureAuthorityStore.java: log.info(SchemaConstants.AUTHORITY_CREATED);
AzureEntityTypeStore.java: log.warning(SchemaConstants.ENTITY_TYPE_EXISTS);
AzureEntityTypeStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
AzureEntityTypeStore.java: log.info(SchemaConstants.ENTITY_TYPE_CREATED);
AzureSchemaInfoStore.java: log.warning(SchemaConstants.SCHEMA_ID_EXISTS);
AzureSchemaInfoStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
AzureSchemaInfoStore.java: log.info(SchemaConstants.SCHEMA_INFO_CREATED);
AzureSchemaInfoStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
AzureSchemaInfoStore.java: log.info(SchemaConstants.SCHEMA_INFO_UPDATED);
AzureSchemaInfoStore.java: log.error(SchemaConstants.INVALID_SUPERSEDEDBY_ID);
AzureSourceStore.java: log.warning(SchemaConstants.SOURCE_EXISTS);
AzureSourceStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
AzureSourceStore.java: log.info(SchemaConstants.SOURCE_CREATED);
AzureSchemaStore.java: log.info(SchemaConstants.SCHEMA_CREATED);
GCP IMPLEMENTATOIN
=====================
D:\OSDURepos2\schema-service\provider\schema-gcp\src\main>findstr /s /i "log." *.java
GoogleAuthorityStore.java: log.warning(SchemaConstants.AUTHORITY_EXISTS_ALREADY_REGISTERED);
GoogleAuthorityStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
GoogleAuthorityStore.java: log.info(SchemaConstants.AUTHORITY_CREATED);
GoogleEntityTypeStore.java: log.warning(SchemaConstants.ENTITY_TYPE_EXISTS);
GoogleEntityTypeStore.java: log.error(MessageFormat.format(SchemaConstants.OBJECT_INVALID, ex.getMessage()));
GoogleEntityTypeStore.java: log.info(SchemaConstants.ENTITY_TYPE_CREATED);
GoogleSchemaInfoStore.java: log.warning(SchemaConstants.SCHEMA_ID_EXISTS);
GoogleSchemaInfoStore.java: log.error(SchemaConstants.OBJECT_INVALID);
GoogleSchemaInfoStore.java: log.info(SchemaConstants.SCHEMA_INFO_CREATED);
GoogleSchemaInfoStore.java: log.error(SchemaConstants.OBJECT_INVALID);
GoogleSchemaInfoStore.java: log.info(SchemaConstants.SCHEMA_INFO_UPDATED);
GoogleSchemaInfoStore.java: log.error(SchemaConstants.INVALID_SUPERSEDEDBY_ID);
GoogleSourceStore.java: log.warning(SchemaConstants.SOURCE_EXISTS);
GoogleSourceStore.java: log.error(SchemaConstants.OBJECT_INVALID);
GoogleSourceStore.java: log.info(SchemaConstants.SOURCE_CREATED);
GoogleSchemaStore.java: log.info(SchemaConstants.SCHEMA_CREATED);
Test coverage:
No code changes
Does this introduce a breaking change?
- [YES/NO] NO
Pending items
NONE
Reviewer request
- Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
- Block the MR if you feel there is less testing or no details in the MR
- Please cover the following aspects in the MR -- Coding design: <Reviewer1> -- Backward Compatibility: <Reviewer2> -- Feature Logic: <Logic design> -- <Any other context mention here> OR -- <Component 1>: <Reviewer1> -- <CosmosDB>: <Reviewer2> -- <ServiceBus> <Reviewer3> -- <Mention any other component and owner>
Other information
cc: @osdu/platform/roles/azure-contributors