Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
This commit is contained in:
71
scripts/lib/common/logging.sh
Executable file
71
scripts/lib/common/logging.sh
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env bash
|
||||
# Common logging functions for scripts
|
||||
# Usage: source "$SCRIPT_DIR/lib/common/logging.sh"
|
||||
|
||||
# Source colors if not already sourced
|
||||
[ -z "${RED:-}" ] && source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/colors.sh"
|
||||
|
||||
# Logging levels (idempotent & safe to re-source)
|
||||
: "${LOG_LEVEL_DEBUG:=0}"
|
||||
: "${LOG_LEVEL_INFO:=1}"
|
||||
: "${LOG_LEVEL_WARN:=2}"
|
||||
: "${LOG_LEVEL_ERROR:=0}"
|
||||
# Mark as readonly if not already
|
||||
readonly LOG_LEVEL_DEBUG 2>/dev/null || true
|
||||
readonly LOG_LEVEL_INFO 2>/dev/null || true
|
||||
readonly LOG_LEVEL_WARN 2>/dev/null || true
|
||||
readonly LOG_LEVEL_ERROR 2>/dev/null || true
|
||||
|
||||
# Default log level
|
||||
: "${LOG_LEVEL:=$LOG_LEVEL_INFO}"
|
||||
|
||||
# Logging functions
|
||||
log_debug() {
|
||||
[ "$LOG_LEVEL" -le "$LOG_LEVEL_DEBUG" ] && echo -e "${CYAN}[DEBUG]${NC} $*" >&2
|
||||
}
|
||||
|
||||
log_info() {
|
||||
[ "$LOG_LEVEL" -le "$LOG_LEVEL_INFO" ] && echo -e "${GREEN}[INFO]${NC} $*"
|
||||
}
|
||||
|
||||
log_warn() {
|
||||
[ "$LOG_LEVEL" -le "$LOG_LEVEL_WARN" ] && echo -e "${YELLOW}[WARN]${NC} $*" >&2
|
||||
}
|
||||
|
||||
log_error() {
|
||||
[ "$LOG_LEVEL" -le "$LOG_LEVEL_ERROR" ] && echo -e "${RED}[ERROR]${NC} $*" >&2
|
||||
}
|
||||
|
||||
log_success() {
|
||||
echo -e "${GREEN}✓${NC} $*"
|
||||
}
|
||||
|
||||
log_failure() {
|
||||
echo -e "${RED}✗${NC} $*"
|
||||
}
|
||||
|
||||
log_section() {
|
||||
local title="$1"
|
||||
echo ""
|
||||
echo -e "${BOLD}${BLUE}════════════════════════════════════════════════════════════════${NC}"
|
||||
echo -e "${BOLD}${BLUE} ${title}${NC}"
|
||||
echo -e "${BOLD}${BLUE}════════════════════════════════════════════════════════════════${NC}"
|
||||
echo ""
|
||||
}
|
||||
|
||||
log_subsection() {
|
||||
local title="$1"
|
||||
echo ""
|
||||
echo -e "${CYAN}${title}${NC}"
|
||||
echo "$(printf '─%.0s' {1..60})"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Print separator line
|
||||
print_separator() {
|
||||
local char="${1:-=}"
|
||||
local width="${2:-80}"
|
||||
printf "%.0s${char}" $(seq 1 "$width")
|
||||
echo
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user