Skip to content

logger.error prints the stacktrace of line where it was invoked #1681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
orestesgaolin opened this issue Mar 19, 2025 · 3 comments
Open

logger.error prints the stacktrace of line where it was invoked #1681

orestesgaolin opened this issue Mar 19, 2025 · 3 comments

Comments

@orestesgaolin
Copy link

orestesgaolin commented Mar 19, 2025

Related issues

Somewhat related to:

[REQUIRED] Version info

node: 20

firebase-functions: 6.2.0

firebase-tools: 13.30.0

firebase-admin: 12.6.0

[REQUIRED] Test case

import { logger } from "firebase-functions/v2";
import { onCall } from "firebase-functions/v2/https";

export const functionName = onCall({region: ["europe-west1"]}, async (req) => {
  logger.error("User is not allowed to upload data for this userId", [ "234", "123" ]);
})

[REQUIRED] Steps to reproduce

[REQUIRED] Expected behavior

Error stacktrace should not be printed in plain text if not provided

[REQUIRED] Actual behavior

Code sample above results with following outcome in GCP Logging:

Image

Were you able to successfully deploy your functions?

Yes

@google-oss-bot
Copy link
Collaborator

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@CorieW
Copy link
Contributor

CorieW commented Mar 20, 2025

Hi @orestesgaolin,

Thanks for reporting this issue! We’ve received it and are reviewing it. We’ll provide updates as soon as possible.

@CorieW
Copy link
Contributor

CorieW commented Mar 21, 2025

I'll bring this up with the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants