add a CLIENT_CONFIG to the client, serve from BE with env vars
This commit is contained in:
1 parent
ef175950b2
commit
62031a0ab1
12 files changed
+81
-7
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import type { LogLevel } from "@/Types/Log";
|
||||
import { runtimeConfig } from "@/Utils/runtimeConfig";
|
||||
|
||||
interface LogContext {
|
||||
[key: string]: any;
|
||||
@@ -25,7 +26,8 @@ interface ErrorLogData {
|
||||
userAgent: string;
|
||||
}
|
||||
|
||||
const configuredLevel: LogLevel = import.meta.env.VITE_APP_LOG_LEVEL || "error";
|
||||
const configuredLevel: LogLevel =
|
||||
runtimeConfig.logLevel || import.meta.env.VITE_APP_LOG_LEVEL || "error";
|
||||
const configuredPriority = LOG_LEVEL_PRIORITY[configuredLevel];
|
||||
|
||||
const shouldLog = (level: LogLevel): boolean => {
|
||||
|
||||
Reference in new issue
Block a user