forked from OceanDataTools/openrvdas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomposed_logger.yaml
36 lines (33 loc) · 1.13 KB
/
composed_logger.yaml
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
# A sample file for logger/listener/listen.py demonstrating the recursive
# definition functionality by using a ComposedReader or ComposedWriter.
#
# To run, type:
#
# logger/listener/listen.py --config_file test/configs/composed_logger.yaml
#
# Dictionary key/value pairs are used as keyword arguments for creating a
# Listener. The keys "reader", "transform" and "writer" are special-cased to
# indicate that the respective entities should be instantiated (recursively,
# if necessary).
readers:
- class: TextFileReader # multiple readers, so enclose in a list.
kwargs:
file_spec: README.md # initialization keyword args
interval: 0.5
- class: ComposedReader
kwargs:
readers:
class: TextFileReader
kwargs:
file_spec: LICENSE
interval: 1
transforms:
class: PrefixTransform
kwargs:
prefix: 'composed:'
#transforms: # No transforms, so omit entirely
# Only a single writer, not enclosed in a list, to demonstrate/test
# that lists are only needed if we've got multiple components.
writers:
class: TextFileWriter
# no kwargs; no filename provided, so will write to stdout