| 16 | } |
| 17 | |
| 18 | void |
| 19 | logWithPython(const std::string& message, int level) |
| 20 | { |
| 21 | if (!LOGGER_INITIALIZED) { |
| 22 | throw std::runtime_error("Logger is not initialized"); |
| 23 | } |
| 24 | if (!PyErr_Occurred()) { |
| 25 | log_with_python(&message, level); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | } // namespace pystack |