mirror of
https://github.com/gchq/CyberChef
synced 2025-12-15 07:43:22 +00:00
Added logging with configurable levels to make debugging easier.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user