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)
| 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: |
nothing calls this directly
no test coverage detected