How to add print statement in server source code?

My code that updates _User object after Sign in with Apple fails on Heroku with error 206 and I noticed sessionToken is not generated - see here

So I want to add print statements in Auth.js and RestWrite.js where createToken is called.

I tried console.log, logger.info, log.info but none of these work.

What do I need to do?

Welcome to the community :slight_smile:

I tend to use request.log.info('Hello World'). There may be other methods but this works for me!

That didn’t work for me, I did this and it worked:

import logger from './logger';
logger.info('message')

Glad you found a solution, in my haste I assumed you were asking about logging from cloud code :sweat_smile: