You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that you no longer get the error, but this.args.quiet is still undefined in functionsEmulator.js so that doesn't work either.
Discover emulators-startts and try a few things but ultimately give up.
[REQUIRED] Expected behavior
I want to be able to silence most of the output when I start my firebase function.
[REQUIRED] Actual behavior
Instead, I get a bunch of output that hides output from my functions:
Can you find my own logs? After a bit of time looking for them, so can I:
> getting post with ID xbxfZqu5gXN5QyhcfmGk
I'd much rather not have to search through all that output, which is why I'd like to have this --quiet option. Or perhaps a --loglevel option or something. I just need a way to silence the firebase logs.
Reacted by Yuri Sergiichuk, HiDeoo, Dmitry Zinovyev, Marcus Zanona, Will Ceolin, spicemix, Brian Rodriguez, Fabio, Breno Calazans, nitaigao and 35 more
@kentcdodds thanks for the feedback. There has already been quite a lot of discussion about the emulators logging here: #1839
While we do agree that they're a bit noisy, it doesn't seem like we're going to be able to reach consensus about which logs need to be quieted. Every log line has a few fans.
One way we're trying to address this is through the Emulators UI "Logging" tab which allows you to add custom filters for different types of logs and their content. Have you tried that?
I don't want to use the UI, I like seeing the logs in the terminal (I have other processes I'm running concurrently and like to see their logs as well).
Could we not start with a way to quiet all logs? Then things could become more granular from there.
Do you want your user logs from within Functions to be excluded?
No, the pain point I'm feeling right now is that it's difficult for me to find my own logs in the sea of emulator logs. So I want only my logs to be shown when I enable --quiet
Do you want the initial startup logs (the table with the ports and such)?
I'm fine either way. Doesn't conflict with my desire to see my own function logs. I'd personally prefer something less huge during --quiet mode, but it's not a big deal. I just want to see my own logs.
What about error-level logs?
I think if error-level logs were hidden, then folks would be worried about missing important errors and wouldn't use --quiet, so those are probably good to keep included.
Reacted by Dmitry Zinovyev, Gustavo and Vitor Barbosa
@samtstern As another use case, we'd like to make firebase emulators:exec silent (by default).
When we use the package.json including the following content, the exit code of yarn test always returns 0 because grep returns 0 (c.f. #1839 (comment)). So this mean we cannot detect a test failure.
Introducing the --quiet flag for firebase emulators:exec commands would dramatically improve user experience when using Jest alongside the Firebase Emulator.
The logs make test output difficult to locate, especially when looking for Jest's Summary of Failing Tests - so much so that I don't want to use the Emulator until this is solved or I can find a workaround.
Example:
Reacted by Gabriel Petersson, Jiri Zamecnik, Fabio, MZ, denis-vogrincic, eowo, Vedant Kulkarni, Jeff Jenkinson, Gustavo, Stefan Åstrand and 2 more
Hi, thanks for filing this feature request! We are unable to promise any timeline for this, but if others also have this request, adding a +1 on this issue can help us prioritize adding this to the roadmap.
I wish we could suppress these logs in the firebase configuration file - or at least via a command flag during starting the emulators. It clutters our CI logs in a non-meaningful way.
Has anyone actually been able to get this to work? I'm running 12.8.1 with the following:
firebase emulators:exec --project patientnot --log-verbosity SILENT 'npm run test:system'
I still get all the log spam:
services/organization
create
i functions: Loaded environment variables from .env.dev.
i functions: Beginning execution of "australia-southeast1-auth-onUserCreate"
> info: Created userMeta for testOwner {}
i functions: Finished "australia-southeast1-auth-onUserCreate" in 58.244959ms
✔ should create a new organization with valid inputs (1275ms)
i functions: Beginning execution of "australia-southeast1-auth-onUserCreate"
> info: Created userMeta for testOwner {}
i functions: Finished "australia-southeast1-auth-onUserCreate" in 5.904875ms
✔ should throw a ValidationError when the user is already part of an organization (39ms)
i functions: Beginning execution of "australia-southeast1-auth-onUserCreate"
> info: Created userMeta for testOwner {}
i functions: Finished "australia-southeast1-auth-onUserCreate" in 4.433375ms
✔ should throw a ValidationError when the user has not verified their email address
i functions: Beginning execution of "australia-southeast1-auth-onUserCreate"
> info: Created userMeta for testOwner {}
i functions: Finished "australia-southeast1-auth-onUserCreate" in 5.289625ms
Looks like we may have missed a spot for piping through the new --log-vebosity flag to the functions emualtor. Going to take a look today and try to get a fix out in the next patch release.
Reacted by Laurent Payot, Eric Crescioni and Zachary Bohn
Activity
[-]Allow `--quiet` flag[/-][+]Allow `--quiet` flag for `emulators:start`[/+]samtstern commentedon Nov 24, 2020
@kentcdodds thanks for the feedback. There has already been quite a lot of discussion about the emulators logging here:
#1839
While we do agree that they're a bit noisy, it doesn't seem like we're going to be able to reach consensus about which logs need to be quieted. Every log line has a few fans.
One way we're trying to address this is through the Emulators UI "Logging" tab which allows you to add custom filters for different types of logs and their content. Have you tried that?
kentcdodds commentedon Nov 24, 2020
Thanks for the info @samtstern,
I don't want to use the UI, I like seeing the logs in the terminal (I have other processes I'm running concurrently and like to see their logs as well).
Could we not start with a way to quiet all logs? Then things could become more granular from there.
samtstern commentedon Nov 24, 2020
@kentcdodds that's a reasonable request, just want to clarify:
kentcdodds commentedon Nov 24, 2020
No, the pain point I'm feeling right now is that it's difficult for me to find my own logs in the sea of emulator logs. So I want only my logs to be shown when I enable
--quietI'm fine either way. Doesn't conflict with my desire to see my own function logs. I'd personally prefer something less huge during
--quietmode, but it's not a big deal. I just want to see my own logs.I think if error-level logs were hidden, then folks would be worried about missing important errors and wouldn't use
--quiet, so those are probably good to keep included.exKAZUu commentedon Apr 22, 2021
@samtstern As another use case, we'd like to make
firebase emulators:execsilent (by default).When we use the
package.jsonincluding the following content, the exit code ofyarn testalways returns0becausegrepreturns0(c.f. #1839 (comment)). So this mean we cannot detect a test failure.on Mac OS with the following environment:
exKAZUu commentedon Apr 22, 2021
hm, I solved the issue by appending
set -o pipefailto the head of the command.e.g.
unicornware commentedon Apr 22, 2021
Introducing the
--quietflag forfirebase emulators:execcommands would dramatically improve user experience when using Jest alongside the Firebase Emulator.The logs make test output difficult to locate, especially when looking for Jest's Summary of Failing Tests - so much so that I don't want to use the Emulator until this is solved or I can find a workaround.
Example:
spicemix commentedon Apr 28, 2021
...and becomes quite a problem when load testing with
artillery.(Why load test on an emulator? To see how things work with the scenario before having to pay for it!)
I would like it for
:execas well as:startfor CI use thanks!JasperSurmont commentedon May 26, 2021
Is there any progress in allowing us to use a
--quietflag to disable all emulator logs?nitaigao commentedon Jun 29, 2021
Ideally would prefer to see zero log output from the emulators when running unit tests
yuchenshi commentedon Jul 27, 2021
Hi, thanks for filing this feature request! We are unable to promise any timeline for this, but if others also have this request, adding a +1 on this issue can help us prioritize adding this to the roadmap.
(Googler-only internal tracking bug: b/194801987)
15 remaining items
isomorpheric commentedon Oct 3, 2023
I wish we could suppress these logs in the firebase configuration file - or at least via a command flag during starting the emulators. It clutters our CI logs in a non-meaningful way.
christhompsongoogle commentedon Oct 3, 2023
Setting verbosity via flag: #6429
Adding changelog for #2859 and #6327
Adding changelog for #2859 and #6327 (#6440)
lox commentedon Nov 7, 2023
Has anyone actually been able to get this to work? I'm running
12.8.1with the following:I still get all the log spam:
isomorpheric commentedon Nov 8, 2023
Similar to @lox - I also still get logs, on version
12.8.1:My command:
joehan commentedon Nov 14, 2023
Looks like we may have missed a spot for piping through the new
--log-vebosityflag to the functions emualtor. Going to take a look today and try to get a fix out in the next patch release.Merging master into next. (#6619)
Merging master (#814)
steveobd commentedon Jun 17, 2024
+1
risalfajar commentedon May 29, 2025
Please update the docs about this:
https://firebase.google.com/docs/emulator-suite/install_and_configure#startup