Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Fix blocking functions in the emulator when using multiple codebases (#6504).
- Add force flag call-out for bypassing prompts (#6506).
- Fixed an issue where the functions emulator did not respect the `--log-verbosity` flag (#2859).
2 changes: 1 addition & 1 deletion scripts/emulator-tests/functionsEmulator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe("FunctionsEmulator", function () {
projectId: TEST_PROJECT_ID,
projectDir: MODULE_ROOT,
emulatableBackends: [TEST_BACKEND],
quiet: true,
verbosity: "QUIET",
adminSdkConfig: {
projectId: TEST_PROJECT_ID,
databaseURL: `https://${TEST_PROJECT_ID}-default-rtdb.firebaseio.com`,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ export async function startAll(
host: functionsAddr.host,
port: functionsAddr.port,
debugPort: inspectFunctions,
verbosity: options.logVerbosity,
projectAlias: options.projectAlias,
});
await startEmulator(functionsEmulator);
Expand Down
6 changes: 4 additions & 2 deletions src/emulator/functionsEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export interface FunctionsEmulatorArgs {
account?: Account;
port?: number;
host?: string;
quiet?: boolean;
verbosity?: "SILENT" | "QUIET" | "INFO" | "DEBUG";
disabledRuntimeFeatures?: FunctionsRuntimeFeatures;
debugPort?: number;
remoteEmulators?: Record<string, EmulatorInfo>;
Expand Down Expand Up @@ -215,7 +215,9 @@ export class FunctionsEmulator implements EmulatorInstance {

constructor(private args: FunctionsEmulatorArgs) {
// TODO: Would prefer not to have static state but here we are!
EmulatorLogger.setVerbosity(this.args.quiet ? Verbosity.QUIET : Verbosity.DEBUG);
EmulatorLogger.setVerbosity(
this.args.verbosity ? Verbosity[this.args.verbosity] : Verbosity["DEBUG"]
);
// When debugging is enabled, the "timeout" feature needs to be disabled so that
// functions don't timeout while a breakpoint is active.
if (this.args.debugPort) {
Expand Down
2 changes: 1 addition & 1 deletion src/functionsShellCommandAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const actionFunction = async (options: Options) => {

return serveFunctions
.start(options, {
quiet: true,
verbosity: "QUIET",
remoteEmulators,
debugPort,
})
Expand Down