Skip to content

Commit 207ae72

Browse files
committed
Updates log utils
1 parent 42d7cd1 commit 207ae72

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

core/vmnf_log_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
def configure_logging(plugin_name):
55
plugin_name = plugin_name.split('.')[0]
6-
log_dir = os.path.expanduser('~/vimana/log')
6+
7+
# Use new .vimana directory structure
8+
vimana_home = os.getenv('VIMANA_HOME', os.path.expanduser('~/.vimana'))
9+
log_dir = os.path.join(vimana_home, 'logs')
10+
711
if not os.path.exists(log_dir):
812
os.makedirs(log_dir)
913

scripts/vfe

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,40 @@
66
# Vimana Framework Environment (VFE) - Quick activation script
77
# Usage: source vfe OR . vfe
88

9-
# Check if Vimana is installed in home directory
10-
if [ ! -d "$HOME/vimana-framework" ]; then
11-
echo "❌ Vimana Framework not found in ~/vimana-framework"
9+
# Check if Vimana is installed (try new location first, then legacy)
10+
VIMANA_DIR=""
11+
if [ -d "$HOME/.vimana/repo" ]; then
12+
VIMANA_DIR="$HOME/.vimana/repo"
13+
elif [ -d "$HOME/vimana-framework" ]; then
14+
VIMANA_DIR="$HOME/vimana-framework"
15+
else
16+
echo "❌ Vimana Framework not found in ~/.vimana/repo or ~/vimana-framework"
1217
echo "💡 Install it first with:"
1318
echo " curl -s https://raw.githubusercontent.com/s4dhulabs/vimana-framework/develop/scripts/install | bash"
1419
return 1 2>/dev/null || exit 1
1520
fi
1621

1722
# Check if virtual environment exists
18-
if [ ! -f "$HOME/vimana-framework/.venv/bin/activate" ]; then
23+
if [ ! -f "$VIMANA_DIR/.venv/bin/activate" ]; then
1924
echo "❌ Virtual environment not found. Setting up Vimana..."
20-
cd "$HOME/vimana-framework"
25+
cd "$VIMANA_DIR"
2126
source scripts/setup-uv
2227
return 0
2328
fi
2429

2530
echo "🚀 Activating Vimana Framework Environment..."
2631

32+
# Set environment variables
33+
export VIMANA_HOME="$HOME/.vimana"
34+
export VIMANA_PATH="$VIMANA_DIR"
35+
2736
# Activate the virtual environment
28-
source "$HOME/vimana-framework/.venv/bin/activate"
37+
source "$VIMANA_DIR/.venv/bin/activate"
2938

3039
# Set custom prompt
3140
export PS1="(vimana-framework) ⚡ "
3241

3342
# Change to Vimana directory
34-
cd "$HOME/vimana-framework"
43+
cd "$VIMANA_DIR"
3544
vimana
3645

0 commit comments

Comments
 (0)