bitovi / bitovi/bitops

Inject `debug|info|error` bash functions to the plugins

Open
#401 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
37
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Try to inject from the BitOps core bash functions into the plugins.

And so we could do this in plugin `deploy.sh`:

```sh
#!/bin/bash

info "This is an info message"
debug "This is debug"
error "Error message"
```
which will be consistent with the BitOps py core and follow the same color palette.

This way, depending on the real BITOPS_LOGGING_LEVEL set by the user in config, we use the respective logging level in the plugins (deploy.sh) bash code too.

This will help dealing with the logging mess in the plugins (`set -x`) and overall improve #270, allowing to use BitOps more as a framework and consistent system with helpers.

https://unix.stackexchange.com/questions/233091/bash-functions-in-shell-variables/233142#233142

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.