@@ -23,10 +23,9 @@ export function ensureAdminApp(
2323 name = FIREBASE_ADMIN_APP_NAME
2424) {
2525 // only initialize the admin sdk once
26- logger . debug ( `💭 Getting admin app "${ name } "` )
26+ logger . debug ( `Checking if admin app "${ name } " exists... ` )
2727
2828 if ( ! getAdminApps ( ) . find ( ( app ) => app . name === name ) ) {
29- logger . debug ( `🔶 Initializing admin app "${ name } "` )
3029 const {
3130 // these can be set by the user on other platforms
3231 FIREBASE_PROJECT_ID ,
@@ -50,7 +49,7 @@ export function ensureAdminApp(
5049
5150 if ( FIREBASE_CONFIG || FUNCTION_NAME ) {
5251 // TODO: last time I tried this one fails on the server
53- logger . debug ( `using FIREBASE_CONFIG env variable for ${ FUNCTION_NAME } ` )
52+ logger . debug ( `Using FIREBASE_CONFIG env variable for ${ FUNCTION_NAME } ` )
5453 initializeAdminApp ( undefined , name )
5554 } else {
5655 let credential : FirebaseAdminCredential
@@ -83,7 +82,7 @@ export function ensureAdminApp(
8382 } else if ( FIREBASE_PRIVATE_KEY ) {
8483 // This version should work in Firebase Functions and other providers while applicationDefault() only works on
8584 // Firebase deployments
86- logger . debug ( 'using FIREBASE_PRIVATE_KEY env variable' )
85+ logger . debug ( 'Using FIREBASE_PRIVATE_KEY env variable' )
8786 credential = cert ( {
8887 projectId : FIREBASE_PROJECT_ID ,
8988 clientEmail : FIREBASE_CLIENT_EMAIL ,
@@ -92,7 +91,7 @@ export function ensureAdminApp(
9291 } )
9392 } else {
9493 // automatically picks up the service account file path from the env variable
95- logger . debug ( 'using applicationDefault()' )
94+ logger . debug ( 'Using applicationDefault()' )
9695 credential = applicationDefault ( )
9796 }
9897 // No credentials were provided, this will fail so we throw an explicit error
@@ -105,6 +104,10 @@ export function ensureAdminApp(
105104 // )
106105 // throw new Error('admin-app/missing-credentials')
107106
107+ logger . debug (
108+ `Initializing Admin App "${ name } " with options:` ,
109+ firebaseAdminOptions
110+ )
108111 initializeAdminApp (
109112 {
110113 // TODO: is this really going to be used?
0 commit comments