As a platform maintainer/developer
I want structured logging in libraries
**So that I have feedback on operations occurring in libraries
Acceptance criteria
frms-coe-lib can utilise the platform logger to report on the tasks it's performing.
Motivation
The frms-coe-lib caches rule configs after the first database lookup. This means there are two potential sources of the rule config, from cache, or from the database. Because there aren't any log statements in the library, callers of the library's methods have no way to tell where particular data comes from (if it can come from multiple places). For example, getRuleConfig() first checks cache and then does a database lookup.
We could have log statements that provide feedback in which path of execution was followed:
In the case of cache:
loggerService.log('querying local cache for rule config abc')
And then in the case of database lookup
loggerService.log('querying database for rule config abc')
Story statement
As a platform maintainer/developer I want structured logging in libraries **So that I have feedback on operations occurring in libraries
Acceptance criteria
frms-coe-lib
can utilise the platform logger to report on the tasks it's performing.Motivation
The
frms-coe-lib
caches rule configs after the first database lookup. This means there are two potential sources of the rule config, from cache, or from the database. Because there aren't any log statements in the library, callers of the library's methods have no way to tell where particular data comes from (if it can come from multiple places). For example,getRuleConfig()
first checks cache and then does a database lookup.We could have log statements that provide feedback in which path of execution was followed: In the case of cache:
And then in the case of database lookup
if we know and can report on what is happening in the libraries, it may work towards identifying the causes for https://github.com/frmscoe/General-Issues/issues/360