File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# example: 01 - basic example
3
- source $( dirname $( realpath ${BASH_SOURCE[0]} ) ) /../b-log.sh # include the script
3
+ source " $( dirname " $( realpath ${BASH_SOURCE[0]} ) " ) " /../b-log.sh # include the script
4
4
LOG_LEVEL_ALL # set log level to all
5
5
FATAL " fatal level"
6
6
ERROR " error level"
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# example: 02 - log to file and syslog
3
- source $( dirname $( realpath ${BASH_SOURCE[0]} ) ) /../b-log.sh # include the script
3
+ source " $( dirname " $( realpath ${BASH_SOURCE[0]} ) " ) " /../b-log.sh # include the script
4
4
LOG_LEVEL_ALL # set log level to all
5
5
B_LOG --file log.txt --file-prefix-enable --file-suffix-enable
6
6
B_LOG --syslog ' --tag b-log_example_02'
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# example: 03 - custom log level and template
3
- source $( dirname $( realpath ${BASH_SOURCE[0]} ) ) /../b-log.sh # include the script
3
+ source " $( dirname " $( realpath ${BASH_SOURCE[0]} ) " ) " /../b-log.sh # include the script
4
4
LOG_LEVEL_ALL # set log level to all
5
5
FATAL " fatal level"
6
6
ERROR " error level"
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ set -e # kill script if a command fails
11
11
set -o nounset # unset values give error
12
12
set -o pipefail # prevents errors in a pipeline from being masked
13
13
14
- script_path=$( dirname $( realpath ${BASH_SOURCE[0]} ) ) # the path to the script
15
- source ${script_path} /../b-log.sh # include the log script
14
+ script_path=" $( dirname " $( realpath ${BASH_SOURCE[0]} ) " ) " # the path to the script
15
+ source " ${script_path} " /../b-log.sh # include the log script
16
16
17
17
echo " --------------------------------------------------"
18
18
echo " Example of"
You can’t perform that action at this time.
0 commit comments