UPDATE: change trace ENV names

This commit is contained in:
merelendor 2024-03-04 09:50:06 +03:00
parent 730e436861
commit 4ec4965510

View File

@ -7,14 +7,14 @@ const traceLog = (value) =>
{ {
if(typeof window === 'undefined') if(typeof window === 'undefined')
{ {
if(parseInt(process.env.NEXT_PUBLIC_SERVER_LOG, 10) === 1) if(parseInt(process.env.NEXT_PUBLIC_CONSOLE_LOG_SERVER, 10) === 1)
{ {
console.log(value); console.log(value);
} }
} }
else else
{ {
if(parseInt(process.env.NEXT_PUBLIC_LOG, 10) === 1) if(parseInt(process.env.NEXT_PUBLIC_CONSOLE_LOG_CLIENT, 10) === 1)
{ {
console.log(value); console.log(value);
} }
@ -32,14 +32,14 @@ const traceDebug = (value) =>
{ {
if(typeof window === 'undefined') if(typeof window === 'undefined')
{ {
if(parseInt(process.env.NEXT_PUBLIC_SERVER_LOG, 10) === 1) if(parseInt(process.env.NEXT_PUBLIC_CONSOLE_LOG_SERVER, 10) === 1)
{ {
console.debug(value); console.debug(value);
} }
} }
else else
{ {
if(parseInt(process.env.NEXT_PUBLIC_LOG, 10) === 1) if(parseInt(process.env.NEXT_PUBLIC_CONSOLE_LOG_CLIENT, 10) === 1)
{ {
console.debug(value); console.debug(value);
} }
@ -57,14 +57,14 @@ const traceError = (value) =>
{ {
if(typeof window === 'undefined') if(typeof window === 'undefined')
{ {
if(parseInt(process.env.NEXT_PUBLIC_SERVER_LOG, 10) === 1) if(parseInt(process.env.NEXT_PUBLIC_CONSOLE_LOG_SERVER, 10) === 1)
{ {
console.error(value); console.error(value);
} }
} }
else else
{ {
if(parseInt(process.env.NEXT_PUBLIC_LOG, 10) === 1) if(parseInt(process.env.NEXT_PUBLIC_CONSOLE_LOG_CLIENT, 10) === 1)
{ {
console.error(value); console.error(value);
} }