File tree 3 files changed +9
-7
lines changed
3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ import { join as pathJoin } from "path";
6
6
export { LogLevel } ;
7
7
8
8
export const config = {
9
- LogFileName : process . env . LogFileName || "ppaas-common" ,
10
- LoggingLevel : process . env . LoggingLevel as Logger . LogLevel || "info" ,
11
- LoggingLevelConsole : process . env . LoggingLevelConsole as Logger . LogLevel || "warn" ,
9
+ LogFileName : process . env . LOG_FILE_NAME || process . env . LogFileName || "ppaas-common" ,
10
+ LoggingLevel : process . env . LOGGING_LEVEL as Logger . LogLevel || process . env . LoggingLevel as Logger . LogLevel || "info" ,
11
+ LoggingLevelConsole : process . env . LOGGING_LEVEL_CONSOLE as Logger . LogLevel || process . env . LoggingLevelConsole as Logger . LogLevel || "warn" ,
12
12
LogFileLocation : process . env . LOG_FILE_LOCATION || "."
13
13
} ;
14
14
Original file line number Diff line number Diff line change @@ -80,8 +80,10 @@ export class YamlParser {
80
80
config = new Config (
81
81
fileBuffer ,
82
82
varMap ,
83
- typeof logConfig . LoggingLevel === "number" ? undefined : logConfig . LoggingLevel
84
- // TODO: Add version checker
83
+ // If RUST_LOG is set use that, otherwise use LoggingLevel
84
+ process . env . RUST_LOG || ( typeof logConfig . LoggingLevel === "number"
85
+ ? undefined
86
+ : logConfig . LoggingLevel )
85
87
) ;
86
88
yamlValid = true ;
87
89
} catch ( error : unknown ) {
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ const nextConfig = {
106
106
distDir : "dist" ,
107
107
// env: {} // env variables are set at build time, not run time. They are better optimized during the build process
108
108
publicRuntimeConfig : { // These are sent to the client and the server and are set at run time
109
- LoggingLevel : process . env . LoggingLevel ,
109
+ LOGGING_LEVEL : process . env . LOGGING_LEVEL || process . env . LoggingLevel ,
110
110
APPLICATION_NAME : process . env . APPLICATION_NAME ,
111
111
SYSTEM_NAME : process . env . SYSTEM_NAME ,
112
112
FS_SITE : process . env . FS_SITE ,
@@ -135,7 +135,7 @@ const nextConfig = {
135
135
} ,
136
136
// https://github.com/vercel/next.js/discussions/11493#discussioncomment-14606
137
137
env : { // These are sent to the client and the server and are set at build time for static pages
138
- LoggingLevel : process . env . LoggingLevel || "" , // Only checks if debug
138
+ LOGGING_LEVEL : process . env . LOGGING_LEVEL || process . env . LoggingLevel || "" , // Only checks if debug
139
139
// @ts -ignore
140
140
APPLICATION_NAME : process . env . APPLICATION_NAME ,
141
141
// @ts -ignore
You can’t perform that action at this time.
0 commit comments