I'm trying to upload Qt's log to firebase.
Here is saved file's logs.
❯ cat *.log
2019:04:01 17:51:23.831 [Info] "FireRest version_name:0.1" [../LoginApp/mainwindow.cpp:13, MainWindow::MainWindow(QWidget *)]
2019:04:01 17:51:27.417 [Debug] Construct SignUpDialog [../LoginApp/signupdialog.cpp:16, SignUpDialog::SignUpDialog(QWidget *)]
My uploading code is at below.
QFile *file = FireRest::getLogFile();
if (!file->open(QIODevice::ReadOnly)) {
QMessageBox::warning(this, "warning", file->errorString());
return;
}
QTextStream in(file);
while(!in.atEnd()) {
QString line = in.readLine();
uploadLog(line);
}
I'm using Firebase's REST API with put
.
But, uploaded data is deleted immediately without any delete operation.
First picture is on uploading.
this picture is after uploaded. red colored items were disappeared.
What stands for these yellow, green, red color for items?
The colors in the Firebase Realtime Database console have the following meaning:
If you've used the Firebase API before, you might recognize these as the child_removed
, child_added
, and child_changed
events.
From experience, I'd say that your first screenshot corresponds to code that performs a set(...)
operation of a child under /devices/ered34wa/logs
. The operation writes the new child, but removes the existing child nodes.