A small npm package so you can have logs in papertrail when using Actions

I’m starting to use actions on the Auth0 platform, and the logging experience is not very good. I have therefore created a library you can use, to send logs to papertrail instead (a log management service with a good free-tier).

After adding the npm package simple-papertrail-logger@latest, you can then benefit from frustration free logging in your actions:

const logger = new SimplePapertrailLogger({papertrailToken: context.secrets.LOG_KEY, logIdentifier: event.actor.hostname})
try {
    logger.addMessage('test this out');
} catch (err) {
    logger.addMessage('Some code failed');
} finally {
    logger.sendMessages()
    .then((result) => console.log(result)) // <== Make the result of the papertrail logs visible to Auth0 logs

Enjoy :sparkles:

Relevant links:

1 Like

Thanks for sharing that with the rest of community! Moving it under our “Show Your Auth0” category where we showcase such things.

1 Like