qiskit-documentation/docs/api/qiskit/0.29/logging.mdx

42 lines
2.1 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: logging
description: API reference for qiskit.ignis.logging
in_page_toc_min_heading_level: 2
python_api_type: module
python_api_name: qiskit.ignis.logging
---
<span id="module-qiskit.ignis.logging" />
<span id="qiskit-ignis-logging" />
# Logging
<span id="module-qiskit.ignis.logging" />
`qiskit.ignis.logging`
| | |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| [`IgnisLogger`](qiskit.ignis.logging.IgnisLogger "qiskit.ignis.logging.IgnisLogger")(name\[, level]) | A logger class for Ignis |
| [`IgnisLogging`](qiskit.ignis.logging.IgnisLogging "qiskit.ignis.logging.IgnisLogging")(\[log\_config\_path]) | Singleton class to configure file logging via IgnisLogger |
| [`IgnisLogReader`](qiskit.ignis.logging.IgnisLogReader "qiskit.ignis.logging.IgnisLogReader")() | Class to read from Ignis log files |
### IgnisLogger
<Class id="qiskit.ignis.logging.IgnisLogger" github="https://github.com/qiskit-community/qiskit-ignis/tree/stable/0.6/qiskit/ignis/logging/ignis_logging.py" signature="IgnisLogger(name, level=0)" modifiers="class">
A logger class for Ignis
IgnisLogger is a like any other `logging.Logger` object except it has an additional method, [`log_to_file()`](qiskit.ignis.logging.IgnisLogger#log_to_file "qiskit.ignis.logging.IgnisLogger.log_to_file"), used to log data in the form of key:value pairs to a log file. Logging configuration is performed via a configuration file and is handled by IgnisLogging.
Refer to Pythons logging documentation for more details on how to use logging in Python
Initialize the IgnisLogger object
**Parameters**
* **name** (`str`) name of the logger. Usually set to package name using \_\_name\_\_
* **level** (*logging.NOTSET*) Verbosity level (use logging package enums)
</Class>