metcoder95 / cloud-pine

Pino Transport abstraction for Google Cloud Logging
MIT License
12 stars 2 forks source link

fix: add check if msg and meta properties are deleted and give priority to log.meta in meta object #14

Closed kruczyna closed 2 years ago

kruczyna commented 2 years ago

Added a check to make sure the msg and meta properties are deleted. Did not return as it's not a business critical issue. Also, the coverage dropped to 91%, did not cover those lines with unit tests yet. Is this something desired, though? I am not sure about that TBH 😅 Context: If we don't delete it will end with a duplicated messge, something like msg: 'I am a message' and message: 'I am a message. If we do not delete the meta property we'll not have more custom meta in the LogEntry.

metcoder95 commented 2 years ago

I think is not necessary to do such checks but I agree we can do a fast check before deleting the property as can reduce unnecessary burden 👍

About the coverage is ok if it drops but we should always aim to keep it around ~90% 👍