File: stdout.py

package info (click to toggle)
python-eliot 1.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: python: 8,641; makefile: 151
file content (19 lines) | stat: -rw-r--r-- 338 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
Output a few Eliot message to standard out.
"""

import sys
import time

from eliot import log_message, to_file
to_file(sys.stdout)


def main():
    log_message(message_type="test", value="hello", another=1)
    time.sleep(0.2)
    log_message(message_type="test", value="goodbye", another=2)


if __name__ == '__main__':
    main()