source: ammosreader/org/README.org

guix
Last change on this file was f3b78e8, checked in by Enrico Schwass <ennoausberlin@…>, 2 years ago

AMMOS_LOG_LEVEL added

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#+OPTIONS: ^:nil
2
3* AmmosReader
4
5Project containing necessary File- or SocketStream-Reader to read the various datastreams of Ammos
6
7* Installation
8
9** Standard pip install (not tested on all platforms)
10
11#+BEGIN_SRC shell
12git clone http://gitlab.kid.local/kidzg/ammosreader.git
13cd ammosreader
14python3 -m pip install .
15#+END_SRC
16
17** Using the guix functional package manager
18
19First subscribe to the GUIX oai channel (see Chapter Add channel to system) in
20https://gitlab.kid.local/kidzg/guix-deployment/-/blob/master/DevOps.org)
21
22Then install using the guix
23
24#+BEGIN_SRC shell
25guix package -i python-ammosreader
26#+END_SRC
27
28* Usage
29
30There are two scripts, which demonstrate the usage of the ammosreader package.
31
32** iqdw_reader.py
33
34#+BEGIN_SRC shell
35python3 iqdw_reader.py 'path_to_iqdw_file'
36#+END_SRC
37
38** pdw_reader.py
39
40#+BEGIN_SRC shell
41python3 pdw_reader.py 'path_to_pdw_file'
42#+END_SRC
43
44To minimize depencencies of the core package other scripts (audio_reader, ammos_viewer)
45are now stored in separate packages.
46
47* Logging
48
49If you use ammosreader in your own scripts a logger can be imported and used as follows:
50
51#+BEGIN_SRC python
52from ammosreader import logger
53logger.warning("Put your warning here")
54#+END_SRC
55
56** Log-File
57
58The name of the logfile is ammos.log
59The logger uses the directory stored in the AMMOS_LOG_DIR environment variable.
60If this variable is not set, /tmp is used as default. This might change to /var/log/
61in future versions running under GUIX system.
62If the logfile is not writable, the standard logger config is used and
63the logs go directly to console (tty).
64(see ammos_logging.conf file in this repository)
65
66** Log-Level
67
68You can change the log-Level by setting the environment variable AMMOS_LOG_LEVEL.
69To turn off logging completely set the level to 'CRITICAL'
70
71#+BEGIN_SRC shell
72export AMMOS_LOG_LEVEL=CRITICAL
73#+END_SRC
74
75If the environment variable does not exist, the logging level from ammos_logging.conf is used.
Note: See TracBrowser for help on using the repository browser.