mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2026-08-19 20:23:07 -04:00
12 lines
309 B
Python
12 lines
309 B
Python
import logging
|
|
import os
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class NullWriter:
|
|
def write(self, data):
|
|
if os.environ.get("CRAFTY_LOG_NULLWRITER", "false") == "true":
|
|
logger.debug(data)
|
|
if os.environ.get("CRAFTY_PRINT_NULLWRITER", "false") == "true":
|
|
print(data)
|