How can we improve Microsoft Azure Functions?

console.log works as well as context.log in node.js

In a function written in node.js, console.log should log to the error log/console just as context.log does.

It would allow using the same debug in code that is been run both in standalone node.js and in function node.js. It is painful to have to alter the calls when moving code between the environments.

8 votes
Sign in
Sign in with: Microsoft
Signed in as (Sign out)

We’ll send you updates on this idea

Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Microsoft
Signed in as (Sign out)
  • Andrea Richiardi commented  ·   ·  Flag as inappropriate

    Dear Colby, this is really really unfortunately and I hope you will eventually decide to .

    The fact that an app should not be concerned with logging is a very important thing to have. It is so important that it shows up in The 12-Factor App Logs section:

    As you can read there:

    > [...] each process’ stream will be captured by the execution environment, collated together with all other streams from the app, and routed to one or more final destinations for viewing and long-term archival. These archival destinations are not visible to or configurable by the app, and instead are completely managed by the execution environment.

    In summary, the app should not be concerned about "how" the runtime treats its output.

    This is especially true for functions, which are generally more lightweight and should not really carry the burden that fully-fledged applications have. Logging is done to stdout, aggregation is out of band and the function is leaner.

    I think probably you are aware of all this, I apologize if that is the case, and I hope you reconsider the decision.

  • Alan M commented  ·   ·  Flag as inappropriate

    What is the real status of this? The linked GitHub issue is closed but this feedback item is only planned.

Feedback and Knowledge Base