Home > @datadog/browser-logs > LogsGlobal
Signature:
export interface LogsPublicApi extends PublicApi
Extends: PublicApi
Property | Modifiers | Type | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clearAccount | () => void | Clear all account information | |||||||||||||||||||||||
clearGlobalContext | () => void | Clear the global context See Overwrite context for further information. | |||||||||||||||||||||||
clearUser | () => void | Clear all user information See User context for further information. | |||||||||||||||||||||||
createLogger | (name: string, conf?: LoggerConfiguration) => Logger | The Datadog browser logs SDK contains a default logger `DD_LOGS.logger`, but this API allows to create different ones. See Define multiple loggers for further information. | |||||||||||||||||||||||
getAccount | () => Context | Get account information | |||||||||||||||||||||||
getGlobalContext | () => Context | Get the global Context See Overwrite context for further information. | |||||||||||||||||||||||
getInitConfiguration | () => LogsInitConfiguration | undefined | Get the init configuration | |||||||||||||||||||||||
getInternalContext | (startTime?: number) => InternalContext | undefined | [Internal API] Get the internal SDK context See Access internal context for further information. | |||||||||||||||||||||||
getLogger | (name: string) => Logger | undefined | Get a logger See Define multiple loggers for further information. | |||||||||||||||||||||||
getUser | () => Context | Get user information See User context for further information. | |||||||||||||||||||||||
init | (initConfiguration: LogsInitConfiguration) => void | Init the Logs browser SDK. | |||||||||||||||||||||||
logger | Logger | ||||||||||||||||||||||||
removeAccountProperty | (key: string) => void | Remove an account property | |||||||||||||||||||||||
removeGlobalContextProperty | (key: any) => void | Remove a global context property See Overwrite context for further information. | |||||||||||||||||||||||
removeUserProperty | (key: any) => void | Remove a user property See User context for further information. | |||||||||||||||||||||||
setAccount | (newAccount: Account) => void | Set account information to all events, stored in `@account` | |||||||||||||||||||||||
setAccountProperty | (key: string, property: any) => void |
Set or update the account property, stored in `@account.
setGlobalContext
|
|
(context: any) => void
|
Set the global context information to all logs, stored in `@context`
|
setGlobalContextProperty
|
|
(key: any, value: any) => void
|
Set or update a global context property, stored in `@context. |
setTrackingConsent
|
|
(trackingConsent: TrackingConsent) => void
|
Set the tracking consent of the current user.
|
setUserProperty
|
|
(key: any, property: any) => void
|
Set or update the user property, stored in `@usr. |
|