diff options
| author | kaotisk <kaotisk@arching-kaos.org> | 2025-10-18 00:58:06 +0300 |
|---|---|---|
| committer | kaotisk <kaotisk@arching-kaos.org> | 2025-10-18 00:58:06 +0300 |
| commit | b9845755c582792950404d1bf75905f284272a79 (patch) | |
| tree | 1f7afb11fe524eda299acb4259c909e50a96cfbf | |
| parent | aec105078d8a1b64ca75bc3b7cb20c1d2dbbd59d (diff) | |
| download | arching-kaos-tools-b9845755c582792950404d1bf75905f284272a79.tar.gz arching-kaos-tools-b9845755c582792950404d1bf75905f284272a79.tar.bz2 arching-kaos-tools-b9845755c582792950404d1bf75905f284272a79.zip | |
[ak] Adds verbose logging flag
| -rwxr-xr-x | api/index.js | 2 | ||||
| -rwxr-xr-x | bin/ak | 22 |
2 files changed, 19 insertions, 5 deletions
diff --git a/api/index.js b/api/index.js index f22d448..6fd2066 100755 --- a/api/index.js +++ b/api/index.js @@ -1,5 +1,6 @@ const http = require("node:http"); +// Route functions const welcomeMessage = require("./routes/default/index.js"); const getAKNSKey = require("./routes/getAKNSKey/index.js"); const getAKNSKeyFromBase = require("./routes/getAKNSKeyFromBase/index.js"); @@ -15,6 +16,7 @@ const getSlatest = require('./routes/getSLatest/index.js'); const getRemoteNodeInfo = require('./routes/getRemoteNodeInfo/index.js'); const getRemotePeers = require('./routes/getRemotePeers/index.js'); +// Libraries const akLogMessage = require('./lib/akLogMessage'); const checkIfAllowedIP = require('./lib/checkIfAllowedIP/index.js'); const storeIncomingIP = require("./lib/storeIncomingIP/index.js"); @@ -17,7 +17,7 @@ ### You should have received a copy of the GNU General Public License ### along with this program. If not, see <http://www.gnu.org/licenses/>. ### -export AK_DEBUG="yes" +export AK_DEBUG="no" export AK_DEBUG_IRC="no" ## ## Arching Kaos CLI tool is the main executable script to use for exploring, @@ -29,14 +29,16 @@ export AK_DEBUG_IRC="no" ## ## Run with no arguments to see available commands ## -## -h, --help Prints this help message +## -h, --help Prints this help message. ## -## -s, --shell Starts an interactive shell +## -s, --shell Starts an interactive shell. ## ## -m, --module [module] Run a specified module. If no module provided ## the list of available modules will be printed. ## -## -f, --function [function] Get the list of available functions +## -f, --function [function] Get the list of available functions. +## +## -v Print all log messages. ## ## [command] [args] Run a command. If none provided a list of ## commands will be printed. @@ -56,6 +58,16 @@ then export AK_DEBUG="no" shift fi +if [ "$1" == "-vn" ] +then + export AK_DEBUG="no" + shift +fi +if [ "$1" == "-v" ] +then + export AK_DEBUG="yes" + shift +fi if [ $# -eq 0 ] then @@ -187,7 +199,7 @@ else fi counter=$(($counter + 1)) done - _ak_usage + # _ak_usage err find $AK_BINDIR | while read available do echo $(basename $available) |\ |
