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

Method set_log_file

python_package/brainflow/ml_model.py:206–218  ·  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

204
205 @classmethod
206 def set_log_file(cls, log_file: str) -> None:
207 """redirect logger from stderr to file, can be called any time
208
209 :param log_file: log file name
210 :type log_file: str
211 """
212 try:
213 file = log_file.encode()
214 except BaseException:
215 file = log_file
216 res = MLModuleDLL.get_instance().set_log_file_ml_module(file)
217 if res != BrainFlowExitCodes.STATUS_OK.value:
218 raise BrainFlowError('unable to redirect logs to a file', res)
219
220 @classmethod
221 def log_message(cls, log_level: int, message: str) -> None:

Callers

nothing calls this directly

Calls 3

BrainFlowErrorClass · 0.70
get_instanceMethod · 0.45

Tested by

no test coverage detected