New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

azure-function-log-intercept

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-function-log-intercept

Add console.log support to Azure Functions

latest
Source
npmnpm
Version
1.1.9
Version published
Maintainers
1
Created
Source

azure-function-log-intercept

Build Status

console.log doesn't actually log as you would expect in node.js Azure Functions. You are expected to use context.log and context is not a global object, it's a parameter to your Azure Function so you would have to pass this throughout your modules/functions to get logging like you would expect.

This package fixes this with minimal friction, 0 dependencies, and allows you to use console.log (and other console methods) like normal.

More information here: https://github.com/Azure/Azure-Functions/issues/1396

Supports:

  • console.log
  • console.error
  • console.warn
  • console.info

npm install azure-function-log-intercept

const intercept = require('azure-function-log-intercept');
const storage = require('./StorageService.js');

module.exports = async function (context, myQueueItem) {
    intercept(context);// console.log works now!
    
    await storage.storeMessage(myQueueItem);

    console.log('Function Completed');
};

Keywords

azure functions

FAQs

Package last updated on 23 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts