@djust-b2b/djust-front-sdk 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,6 +13,7 @@ export type ClientConfig = {
|
|
|
13
13
|
clientName?: string;
|
|
14
14
|
env?: string;
|
|
15
15
|
dsn?: string;
|
|
16
|
+
logLevels?: ("log" | "info" | "warn" | "error")[];
|
|
16
17
|
};
|
|
17
18
|
export declare const initialize: (initConfig: ClientConfig) => void;
|
|
18
19
|
export declare const updateConfiguration: (newConfig: Partial<ClientConfig>) => void;
|
|
@@ -45,8 +45,10 @@ let clientConfig = {
|
|
|
45
45
|
dsn: "https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
|
|
46
46
|
env: "development",
|
|
47
47
|
clientName: "Djust",
|
|
48
|
+
logLevels: ["log", "info", "warn", "error"],
|
|
48
49
|
};
|
|
49
50
|
const initialize = (initConfig) => {
|
|
51
|
+
var _a;
|
|
50
52
|
clientConfig = {
|
|
51
53
|
...initConfig,
|
|
52
54
|
};
|
|
@@ -81,7 +83,9 @@ const initialize = (initConfig) => {
|
|
|
81
83
|
profilesSampleRate: 1.0,
|
|
82
84
|
sendDefaultPii: true,
|
|
83
85
|
});
|
|
84
|
-
|
|
86
|
+
if ((_a = clientConfig.logLevels) === null || _a === void 0 ? void 0 : _a.includes("info")) {
|
|
87
|
+
console.info(`[Djust SDK] Sentry initialized in ${clientConfig.clientName || "unknown"} environment: ${clientConfig.env || "unknown"}.`);
|
|
88
|
+
}
|
|
85
89
|
}
|
|
86
90
|
};
|
|
87
91
|
exports.initialize = initialize;
|