auth0-extensions / auth0-extension-realtime-logs

Access real-time webtask logs
MIT License
11 stars 13 forks source link

Console.log Not working #12

Open zachrickards opened 6 years ago

zachrickards commented 6 years ago

Not much to say here other than console.log are not working

shawnmclean commented 6 years ago

Hi @zachrickards. Where are you doing the console.log? I've just tested this from a rule and hook and its showing the output in this extension.

fyockm commented 6 years ago

@zachrickards there is a known issue whereby logging will not work for cron type webtasks if you have selected Node 8. as @shawnmclean mentioned, logging from other extensibility points (rules/hooks/custom db scripts) should be working as expected.

leberknecht commented 1 year ago

Can second that, no console.log output shown from my post-registration hook. It does show the even around it though: image

My snippet:

/**
* Handler that will be called during the execution of a PostUserRegistration flow.
*
* @param {Event} event - Details about the context and user that has registered.
* @param {PostUserRegistrationAPI} api - Methods and utilities to help change the behavior after a signup.
*/
console.log('testing')
const axios = require("axios");

exports.onExecutePostUserRegistration = async (event) => {
  if (event.request["user_agent"] != "Symfony HttpClient/Curl" && event.transaction) {
    return await axios.post(
    `${event.transaction.redirect_uri.replace("xxx.", "api.")}/users/signup`,
    {
      email: event.user.email,
    },
    {
      headers: {
        "X-Signup-Api-Key": `${event.secrets.SIGNUP_API_TOKEN}`,
      }
    }
  );
  }
};

the axios call is actually triggered. Doesnt matter if i test the action from the debug-feature or if its triggered from real-life call. Tested on firefox 114.0.1 and chrome 114.0.5735.198