Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Replace print statements with logger module #115

Description

@kousthubraja

Logging module has added advantage of streaming to files which we can monitor from an webapp or sort.

An example logger init is here

real_path = os.path.realpath(__file__)
dir_path = os.path.dirname(real_path)
LOGFILE = f"{dir_path}/test.log"
logger = logging.getLogger('log_app')
logger.setLevel(logging.DEBUG)
fh = logging.FileHandler(LOGFILE)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
logger.addHandler(fh)

We want to stream logs to a file. The end goal is to be able to monitor the logs from a url on the node. Like here

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions