-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlog
More file actions
executable file
·62 lines (52 loc) · 1.61 KB
/
log
File metadata and controls
executable file
·62 lines (52 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /bin/bash
echo "COMMAND : fire/log shows latest FireFUSE log emtries"
echo "HELP : fire/log -h "
function help() {
echo "SYNOPSIS: fire/log [-c|-t|-d|-i|-h]"
echo "EXAMPLES: Show recent entries"
echo " : fire/log"
echo " : Continuously copy log entries to console (CTRL-C to quit)"
echo " : fire/log -c"
echo " : Log at TRACE level and show fully detailed information about FireFUSE activity"
echo " : fire/log -t"
echo " : Log at DEBUG level and show some detailed information about FireFUSE activity"
echo " : fire/log -d"
echo " : Log at INFO level (default):"
echo " : fire/log -i"
echo " : Print this documentation:"
echo " : fire/log -h"
}
if [ "$1" == "-h" ]; then help; exit 0; fi
sudo -k
ls /dev | grep firefuse > /dev/null
if [ $? -ne 0 ]; then
echo "ERROR : FireFUSE is not installed"
exit -1;
fi
ls /dev/firefuse | grep status > /dev/null
if [ $? -ne 0 ]; then
echo "ERROR : FireFUSE may have crashed."
echo "TRY : fire/config -d"
exit -1
fi
if [ "$1" == "-c" ]; then
echo "LOG : Copy log entries to stdout. CTRL-C to quit."
tail -f /var/log/firefuse.log
exit 0
fi
if [ "$1" == "-t" ]; then
echo "LOG : Logging set to TRACE level. See /var/log/firefuse.log"
echo t > /dev/firefuse/firelog
fi
if [ "$1" == "-d" ]; then
echo "LOG : Logging set to DEBUG level. See /var/log/firefuse.log"
echo d > /dev/firefuse/firelog
fi
if [ "$1" == "-i" ]; then
echo "LOG : Logging set to INFO level. See /var/log/firefuse.log"
echo i > /dev/firefuse/firelog
fi
echo "--------------------------------"
head /var/log/firefuse.log
echo ...
tail /var/log/firefuse.log