The docs points squarely at console.log and its variants, without hinting at alternative logging interfaces.
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-logging.html
Logging (Node.js)
Your Lambda function can contain logging statements. AWS Lambda writes
these logs to CloudWatch. If you use the Lambda console to invoke your
Lambda function, the console displays the same logs.
The following Node.js statements generate log entries:
console.log()
console.error()
console.warn()
console.info()
For example, consider the following Node.js code example.
console.log('Loading function');
exports.handler = function(event, context, callback) {
//console.log('Received event:', JSON.stringify(event, null, 2));
console.log('value1 =', event.key1);
console.log('value2 =', event.key2);
console.log('value3 =', event.key3);
callback(null, event.key1); // Echo back the first key value
};
The screenshot shows an example Log output section in Lambda
console, you can also find these logs in CloudWatch. For more
information, see Accessing Amazon CloudWatch Logs for AWS Lambda.