mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
13 lines
309 B
Python
13 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)
|