Updated on 2022-02-22 GMT+08:00

Example - Logs

Log examples are as follows:

#! /usr/bin/python3.7

import hilens

def run():
    # Set log levels.
    hilens.set_log_level(hilens.DEBUG)

    # Print a log of the Trace level.
    hilens.trace("trace")

    # Print a log of the Debug level.
    hilens.debug("debug")

    # Print a log of the Info level.
    hilens.info("info")

    # Print a log of the Warning level.
    hilens.warning("warning")

    # Print a log of the Error level.
    hilens.error("error")

    # Print a log of the Fatal level.
    hilens.fatal("fatal")

if __name__ == '__main__':
    hilens.init("hello")
    run()
    hilens.terminate()