Logging Best Practise
Dotnet Best Practice¶
Engineers should use Log message template when generating log messages (See Here)
TypeScript Best Practice¶
Engineers should not use console.log
directly, as this can be visible by end users.
Alternatively we should be using the Tracer
objects from the Eden.Scripts
library.
General Best Practice¶
Engineers should provided enough information engineers understand what was happening when reading the log
e.g. Log the client key responsible for the call _logger.LogInformation("Create Controlled Vocabulary '{VocabName}' for client {clientKey}", request.ControlledVocabulary.Name, clientKey);
Engineers should use the correct log level when generating logs (see here)