This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/native/native_log.cpp

14 lines
301 B
C++
Raw Normal View History

2019-12-14 10:04:17 +08:00
#include <QDebug>
#include "native_log.h"
2019-12-17 17:05:57 +08:00
Q_INVOKABLE void NativeLog::function(QString level, QString content) {
2019-12-14 10:04:17 +08:00
if (level == 'w') {
qWarning() << content;
} else if (level == 'd') {
qDebug() << content;
} else if (level == 'e') {
qCritical() << content;
}
}