Skip to content

Cannot add handler to btlogging #3003

@thewhaleking

Description

@thewhaleking

Describe the bug

If I use logging.addHandler, it breaks:

    logging.addHandler(log.FileHandler("/tmp/test.log"))
/opt/homebrew/Cellar/python@3.12/3.12.10_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/logging/__init__.py:1708: in addHandler
    if not (hdlr in self.handlers):
E   AttributeError: 'LoggingMachine' object has no attribute 'handlers'. Did you mean: '_handlers'?

To Reproduce

from bittensor import logging
import logging as log

logging.addHandler(log.SteamHandler()`

Expected behavior

It does not break

Screenshots

No response

Environment

macOS

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions