-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic process namespace support and debug process
- Loading branch information
Showing
19 changed files
with
114 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { BaseProcess } = require('@openeo/js-processgraphs'); | ||
const Commons = require('../processgraph/commons'); | ||
|
||
module.exports = class debug extends BaseProcess { | ||
|
||
async execute(node) { | ||
var dc = node.getArgument('data'); | ||
var code = node.getArgument('data'); | ||
var level = node.getArgument('data', 'info'); | ||
var message = node.getArgument('data'); | ||
|
||
var logger = node.getLogger(); | ||
logger[level](message, data, code); | ||
|
||
return dc; | ||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"id": "debug", | ||
"summary": "Publish debugging information", | ||
"description": "Sends debugging information about the data to the log output. Passes the data through.", | ||
"categories": [ | ||
"development" | ||
], | ||
"experimental": true, | ||
"parameters": [ | ||
{ | ||
"name": "data", | ||
"description": "Data to publish.", | ||
"schema": { | ||
"description": "Any data type is allowed." | ||
} | ||
}, | ||
{ | ||
"name": "code", | ||
"description": "An identifier to help identify the log entry in a bunch of other log entries.", | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"default": "", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "level", | ||
"description": "The severity level of this message, defaults to `info`. Note that the level `error` forces the computation to be stopped!", | ||
"schema": { | ||
"type": "string", | ||
"enum": [ | ||
"error", | ||
"warning", | ||
"info", | ||
"debug" | ||
] | ||
}, | ||
"default": "info", | ||
"optional": true | ||
}, | ||
{ | ||
"name": "message", | ||
"description": "A message to send in addition to the data.", | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"default": "", | ||
"optional": true | ||
} | ||
], | ||
"returns": { | ||
"description": "The data as passed to the `data` parameter without any modification.", | ||
"schema": { | ||
"description": "Any data type is allowed." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters