Skip to content

Commit

Permalink
Merge pull request #43 from Shailesh351/sb_fix_app_console_logs
Browse files Browse the repository at this point in the history
[FIX] App Console Logs not following Log Level set in the App Setting
  • Loading branch information
ear-dev committed Jan 10, 2022
2 parents 5bf6c10 + 3b50612 commit 7777d4b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/compiler/AppCompiler.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/compiler/AppCompiler.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/server/compiler/AppCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class AppCompiler {
const logLevel = logLevelSetting && (logLevelSetting.value || logLevelSetting.packageValue) || 0;

const customRequire = Utilities.buildCustomRequire(files, storage.info.id, logLevel);
const context = Utilities.buildDefaultAppContext({ require: customRequire, exports, process: {}, console });
const context = Utilities.buildDefaultAppContext({ require: customRequire, exports, process: {}, console: Utilities.getConsole(logLevel) });

const script = new vm.Script(files[path.normalize(storage.info.classFile)]);
const result = script.runInContext(context);
Expand Down

0 comments on commit 7777d4b

Please sign in to comment.