serverless / serverless-azure-functions

Serverless Azure Functions Plugin – Add Azure Functions support to the Serverless Framework
MIT License
267 stars 162 forks source link

feat: Logging Service to allow configurable verbosity #401

Closed tbarlow12 closed 4 years ago

tbarlow12 commented 4 years ago

What did you implement:

A LoggingService class that allows for configurable verbosity of logging

Closes #374

How did you implement it:

LoggingService is used by both the BaseService and the BasePlugin, which make all current logging calls. Added calls for error, warn, info and debug to both base service and base plugin. Did not update to use any of the new calls, everything is currently logged as info. Which means that if you were to set verbosity to either warn or error in the CLI, there would be no log statements shown

How can we verify it:

Add -v error to any CLI run. There will be no log statements printed. Then try with -v info or -v debug, and there will be log statements printed. The codebase will need to be updated with the appropriate level of log for each current statement where necessary, but that is outside the scope of this PR.

Todos:

Note: Run npm run test:ci to run all validation checks on proposed changes

Is this ready for review?: YES Is it a breaking change?: NO