We use python
logging module directly. You can use them directly in your callbacks.
logging.info("Hello from Qiling Framework!")
ql.dprint will be depreciated and removed in a later release.
By default, Qiling only outputs of
logging.INFO level to terminal. You may configure such behavior in different ways.
ql = Qiling(['/bin/ls'], "examples/rootfs/x86_linux", console=False)
console=False will disable terminal outputs.
ql = Qiling(['/bin/ls'], "examples/rootfs/x86_linux", output="off")
output is a parameter for compatibility. Its possible values are as follows.
- "default": equals to "output=None", do nothing.
- "off": an alias to "default".
- "debug": set the log level to logging.DEBUG.
- "disasm": diasm each executed instruction.
- "dump": the most verbose output, dump registers and diasm the function blocks.
output can be configured dynamically.
ql = Qiling(['/bin/ls'], "examples/rootfs/x86_linux", verbose=5)
- 0 : logging.WARNING, almost no additional logs except the program output.
=1: logging.INFO, the default logging level.
verbose is another parameter for compatibiliy, which is an alias of different logging levels.
verbose can be configured dynamically.
Filter some specific logs. Very useful if you would like to achieve something like
#!/usr/bin/env python3 from qiling import * if __name__ == "__main__": ql = Qiling(["examples/rootfs/arm_linux/bin/arm_hello"], "examples/rootfs/arm_linux", log_dir="qlog") ql.filter = ["^open"] ql.run()
Note that the content of filter is considered as a regular expression.