stdout_handler.py 418 B

1234567891011121314151617181920212223
  1. import sys
  2. import os
  3. from .handler import handler
  4. class stdout_handler(handler):
  5. """
  6. That handler simple put logs into stdout.
  7. """
  8. def add(self, content: str) -> None:
  9. """
  10. That put content as new line into stdout.
  11. Parameters
  12. ----------
  13. content : str
  14. Content to write as new line.
  15. """
  16. sys.stdout.write(content + os.linesep)