зеркало из https://github.com/mozilla/glean.js.git
Merge pull request #1846 from rosahbruno/1862270-debugging-logs
Bug 1862270 - print messages to the console when debugging APIs are used
This commit is contained in:
Коммит
839e20a592
|
@ -8,6 +8,8 @@
|
|||
|
||||
[#1835](https://github.com/mozilla/glean.js/pull/1835): Added support for automatic page load instrumentation.
|
||||
|
||||
* [#1846](https://github.com/mozilla/glean.js/pull/1846): Add logging messages when using the debugging APIs from the browser console.
|
||||
|
||||
# v4.0.0-pre.1 (2023-12-01)
|
||||
|
||||
[Full changelog](https://github.com/mozilla/glean.js/compare/v4.0.0-pre.0...v4.0.0-pre.1)
|
||||
|
|
|
@ -509,14 +509,19 @@ if (typeof window !== "undefined" && typeof window.sessionStorage !== "undefined
|
|||
setLogPings: (flag: boolean) => {
|
||||
setDebugOptionInSessionStorage(DebugOption.LogPings, flag);
|
||||
Glean.setLogPings(flag);
|
||||
console.log("Pings will be logged to the console until this tab is closed.");
|
||||
},
|
||||
setDebugViewTag: (value: string) => {
|
||||
setDebugOptionInSessionStorage(DebugOption.DebugTag, value);
|
||||
Glean.setDebugViewTag(value);
|
||||
console.log(
|
||||
"Pings will be sent to the Debug Ping Viewer until this tab is closed. Pings can be found here: https://debug-ping-preview.firebaseapp.com/."
|
||||
);
|
||||
},
|
||||
setSourceTags: (value: string[]) => {
|
||||
setDebugOptionInSessionStorage(DebugOption.SourceTags, value);
|
||||
Glean.setSourceTags(value);
|
||||
console.log("Pings will be given the specified tags until the tab is closed.");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче