Index
Modules
Interfaces
Type aliases
Variables
Functions
Type aliases
EmulatorMockTokenOptions
FirebaseSignInProvider
LogLevel
The JS SDK supports 5 log levels and also allows a user the ability to silence the logs altogether.
The order is as follows: silent < debug < verbose < info < warn < error
Variables
SDK_VERSION
The current SDK version.
apps
A (read-only) array of all initialized apps.
Functions
initializeApp
-
Creates and initializes a Firebase app instance.
See Add Firebase to your app and Initialize multiple projects for detailed documentation.
Parameters
-
options: Object
Options to configure the app's services.
-
Optional name: string
Optional name of the app to initialize. If no name is provided, the default is
"[DEFAULT]".
Returns App
The initialized app.
-
onLog
-
Sets log handler for all Firebase packages.
Parameters
-
logCallback: (callbackParams: { args: any[]; level: LogLevel; message: string; type: string }) => void
An optional custom log handler that executes user code whenever the Firebase SDK makes a logging call.
-
-
Parameters
-
callbackParams: { args: any[]; level: LogLevel; message: string; type: string }
-
args: any[]
The raw arguments passed to the log call.
-
level: LogLevel
Level of event logged.
-
message: string
Any text from logged arguments joined into one string.
-
type: string
A string indicating the name of the package that made the log call, such as
@firebase/firestore.
-
Returns void
-
-
-
-
Optional options: { level: LogLevel }
-
level: LogLevel
Threshhold log level. Only logs at or above this level trigger the
logCallbackpassed toonLog.
-
Returns void
-
registerVersion
-
Registers a library's name and version for platform logging purposes.
Parameters
-
library: string
Name of 1p or 3p library (e.g. firestore, angularfire)
-
version: string
Current version of that library.
-
Optional variant: string
Bundle variant, e.g., node, rn, etc.
Returns void
-
setLogLevel
-
Sets log level for all Firebase packages.
All of the log types above the current log level are captured (i.e. if you set the log level to
info, errors are logged, butdebugandverboselogs are not).Parameters
-
logLevel: LogLevel
Returns void
-
firebaseis a global namespace from which all Firebase services are accessed.