mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Added logging with configurable levels to make debugging easier.
This commit is contained in:
parent
124ff83206
commit
d079420d46
17 changed files with 88 additions and 18 deletions
|
@ -111,6 +111,7 @@ Dish.enumLookup = function(typeEnum) {
|
|||
* @param {number} type - The data type of value, see Dish enums.
|
||||
*/
|
||||
Dish.prototype.set = function(value, type) {
|
||||
log.debug("Dish type: " + Dish.enumLookup(type));
|
||||
this.value = value;
|
||||
this.type = type;
|
||||
|
||||
|
@ -141,6 +142,8 @@ Dish.prototype.get = function(type) {
|
|||
* @param {number} toType - The data type of value, see Dish enums.
|
||||
*/
|
||||
Dish.prototype.translate = function(toType) {
|
||||
log.debug(`Translating Dish from ${Dish.enumLookup(this.type)} to ${Dish.enumLookup(toType)}`);
|
||||
|
||||
// Convert data to intermediate byteArray type
|
||||
switch (this.type) {
|
||||
case Dish.STRING:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue