mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 15:07:11 -04:00
Merge pull request #18 from ajmeese7/feat/logging-uri-param
Control logging levels via URI param
This commit is contained in:
commit
49fde14f79
1 changed files with 10 additions and 0 deletions
|
@ -538,6 +538,16 @@ class App {
|
||||||
this.manager.options.changeTheme(Utils.escapeHtml(this.uriParams.theme));
|
this.manager.options.changeTheme(Utils.escapeHtml(this.uriParams.theme));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read in logging level from URI params
|
||||||
|
if (this.uriParams.logging) {
|
||||||
|
const validOptions = ["Silent", "Error", "Warn", "Info", "Debug", "Trace"];
|
||||||
|
if (validOptions.indexOf(this.uriParams.logging) > -1) {
|
||||||
|
this.manager.options.logLevelChange(this.uriParams.logging);
|
||||||
|
} else {
|
||||||
|
log.warn(`Invalid logging level: ${this.uriParams.logging}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.autoBakePause = false;
|
this.autoBakePause = false;
|
||||||
window.dispatchEvent(this.manager.statechange);
|
window.dispatchEvent(this.manager.statechange);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue