Skip to content

🎥 Make videos programmatically with React

make tracable

Jonny Burger8e2636b378e7
diff --git a/packages/renderer/src/logger.ts b/packages/renderer/src/logger.ts
index 5eb8868ab3..bde88f700d 100644
--- a/packages/renderer/src/logger.ts
+++ b/packages/renderer/src/logger.ts
@@ -26,6 +26,27 @@ export const secondverboseTag = (str: string) => {
};
export const Log = {
+ trace: (
+ options: VerboseLogOptions,
+ ...args: Parameters<typeof console.log>
+ ) => {
+ writeInRepro('trace', ...args);
+ if (isEqualOrBelowLogLevel(options.logLevel, 'trace')) {
+ if (args.length === 0) {
+ // Lambda will print "undefined" otherwise
+ return process.stdout.write('\n');
+ }
+
+ return console.log(
+ ...[
+ options.indent ? INDENT_TOKEN : null,
+ options.tag ? verboseTag(options.tag) : null,
+ ]
+ .filter(truthy)
+ .concat(args.map((a) => chalk.gray(a))),
+ );
+ }
+ },
verbose: (
options: VerboseLogOptions,
...args: Parameters<typeof console.log>