dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.16k stars 794 forks source link

refactor: use provided log utils #1784

Closed czubocha closed 1 month ago

czubocha commented 2 months ago

Description

Use log utils provided in the constructor (constructor(serverless, cliOptions, utils), docs) instead of importing @serverless/utils

Motivation and Context

@serverless/utils/log.js is going to be deprecated

How Has This Been Tested?

test:unit passed

Screenshots (if appropriate):

Manual tests:

    log.error("error", new Error("test error"))
    log.info("info", "test info")
    log.verbose("verbose", "test verbose")
    log.warning("warning", "test warning")
    const p = progress.get("test")
    p.notice("test progress")
    setTimeout(() => {
      p.remove()
    }, 5000)
image
czubocha commented 1 month ago

Hey @DorianMazur, can you review this PR so we can merge it to ensure Serverless Offline works with the upcoming Serverless Framework v4 release?

czubocha commented 1 month ago

@DorianMazur have you had a chance to take a look at this PR?

DorianMazur commented 1 month ago

@czubocha Yes, I will test it and probably merge it this weekend.