File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import JSON5 from "json5";
1616import path from "path" ;
1717import { readProjectConfig } from "./config.js" ;
1818import { watchAndPush } from "./dev.js" ;
19+ import { Logger , DefaultLogger } from "../../browser/logging.js" ;
1920
2021export async function runFunctionAndLog (
2122 ctx : Context ,
@@ -33,7 +34,9 @@ export async function runFunctionAndLog(
3334 | undefined ;
3435 } ,
3536) {
36- const client = new ConvexHttpClient ( args . deploymentUrl ) ;
37+ const client = new ConvexHttpClient ( args . deploymentUrl , {
38+ logger : instantiateStderrLogger ( ) ,
39+ } ) ;
3740 const identity = args . identityString
3841 ? await getFakeIdentity ( ctx , args . identityString )
3942 : undefined ;
@@ -491,3 +494,12 @@ export async function runInDeployment(
491494 }
492495 return await runFunctionAndLog ( ctx , args ) ;
493496}
497+
498+ function instantiateStderrLogger ( ) : Logger {
499+ const logger = new DefaultLogger ( { verbose : false } ) ;
500+ logger . addLogLineListener ( ( _level , ...args ) => {
501+ // eslint-disable-next-line no-console
502+ console . error ( ...args ) ;
503+ } ) ;
504+ return logger ;
505+ }
You can’t perform that action at this time.
0 commit comments