MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / set_log_file

Method set_log_file

python_package/brainflow/board_shim.py:669–681  ·  view source on GitHub ↗

redirect logger from stderr to file, can be called any time :param log_file: log file name :type log_file: str

(cls, log_file: str)

Source from the content-addressed store, hash-verified

667
668 @classmethod
669 def set_log_file(cls, log_file: str) -> None:
670 """redirect logger from stderr to file, can be called any time
671
672 :param log_file: log file name
673 :type log_file: str
674 """
675 try:
676 file = log_file.encode()
677 except BaseException:
678 file = log_file
679 res = BoardControllerDLL.get_instance().set_log_file_board_controller(file)
680 if res != BrainFlowExitCodes.STATUS_OK.value:
681 raise BrainFlowError('unable to redirect logs to a file', res)
682
683 @classmethod
684 def get_sampling_rate(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int:

Callers

nothing calls this directly

Calls 3

BrainFlowErrorClass · 0.90
get_instanceMethod · 0.45

Tested by

no test coverage detected