-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Protostream emits the warning "Encountered and ignored and unknown annotation..." whenever it parses the documentation text of a definition which contains (pseudo)annotations that were not defined. These warnings do not always make sense for all use cases of a certain schema. For example a user might have some indexing related annotations that are used by the server, but those same anontations will also be seen by the client when parsing the schema and the client does not need to know or care about them. This means the client does not define them in the Protostream configuration to be parsed, so the parser will complain about them later saying they are unknown.
This issue is benign, as the log message in question is just a WARNing and no exception is thrown, so there is no functional impact on the user app, but it is very noisy and it clogs the log.
The proposed fix is to not emit any such warnings if there are no custom defined annotations in config. If there is at least one custom annotation, then the old behaviour will continue to exist.
An new config flag (AnnotationsConfig.logUndefinedAnnotations - default true) is introduced to be able to turn this warning off completely if needed.