File: test_log_file.sh

package info (click to toggle)
libclaw 1.7.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,080 kB
  • sloc: cpp: 13,287; sh: 227; makefile: 8
file content (27 lines) | stat: -rw-r--r-- 822 bytes parent folder | download | duplicates (8)
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
#!/bin/sh

if [ "$1" != "" ]
then
  OUTPUT_DIR="$1"
else
  OUTPUT_DIR=.
fi

# this test creates three files:
#
# log-file.0.out should be empty.
# log-file.1.out should contain:
#
#  error:error_level:program_name == ./ex-application
#
# log-file.15.out should contain:
#
#  error:error_level:program_name == ./ex-application
#  warning:warning_level:argument 0 == one
#  warning:warning_level:argument 1 == two
#  warning:warning_level:argument 2 == three
#  verbose_level:m_app is running
#
./ex-application -b --string="my string" one two three --log-level=0 --log-file="$OUTPUT_DIR/log-file.0.out"
./ex-application -b --string="my string" one two three --log-level=1 --log-file="$OUTPUT_DIR/log-file.1.out"
./ex-application -b --string="my string" one two three --log-level=15 --log-file="$OUTPUT_DIR/log-file.15.out"