🎥 Make videos programmatically with React
add logging facility
Jonny Burger82c8cfd4e4ac
diff --git a/packages/cloudrun/src/cli/log.ts b/packages/cloudrun/src/cli/log.tsindex 96a4fa994b..830f44be5b 100644--- a/packages/cloudrun/src/cli/log.ts+++ b/packages/cloudrun/src/cli/log.ts@@ -1,3 +1,3 @@-import {CliInternals} from '@remotion/cli';+import {RenderInternals} from '@remotion/renderer';-export const {Log} = CliInternals;+export const {Log} = RenderInternals;diff --git a/packages/cloudrun/src/functions/render-still-single-thread.ts b/packages/cloudrun/src/functions/render-still-single-thread.tsindex e5e54e4f30..d3eee7b382 100644--- a/packages/cloudrun/src/functions/render-still-single-thread.ts+++ b/packages/cloudrun/src/functions/render-still-single-thread.ts@@ -1,6 +1,7 @@import type * as ff from '@google-cloud/functions-framework';import {Storage} from '@google-cloud/storage';import {RenderInternals, renderStill} from '@remotion/renderer';+import {Log} from '../cli/log';import {randomHash} from '../shared/random-hash';import {getCompositionFromBody} from './helpers/get-composition-from-body';import type {@@ -16,11 +17,15 @@ export const renderStillSingleThread = async (throw new Error('expected type still');}+ Log.verbose('Rendering still frame', body);+const composition = await getCompositionFromBody(body.serveUrl,body.composition);+ Log.verbose('Composition loaded', composition);+const tempFilePath = '/tmp/still.png';const renderId = randomHash({randomInTests: true});