adobe/aio-lib-core-logging

logging should support string substitutions

purplecabbage opened this issue · 0 comments

for (let i=0; i<3; i++) {
    console.log("Hello, %s. You've called me %d times.", "Bob", i+1)
    aioLogger.debug("Hello, %s. You've called me %d times.", "Bob", i+1)
  }
2020-03-10T22:55:14.531Z       stdout: Hello, Bob. You've called me 1 times.
2020-03-10T22:55:14.532Z       stdout: 2020-03-10T22:55:14.532Z @adobe/aio-app-myapps/resolver:debug Hello, %s. You've called me %d times.
2020-03-10T22:55:14.532Z       stdout: Hello, Bob. You've called me 2 times.
2020-03-10T22:55:14.532Z       stdout: 2020-03-10T22:55:14.532Z @adobe/aio-app-myapps/resolver:debug Hello, %s. You've called me %d times.
2020-03-10T22:55:14.533Z       stdout: Hello, Bob. You've called me 3 times.
2020-03-10T22:55:14.533Z       stdout: 2020-03-10T22:55:14.533Z @adobe/aio-app-myapps/resolver:debug Hello, %s. You've called me %d times.