wip: file log
This commit is contained in:
parent
4756a00156
commit
46224d331c
4 changed files with 58 additions and 4 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <QString>
|
||||
#include <QFile>
|
||||
//#include "contclasses.h"
|
||||
#define INIT_FILELOG
|
||||
#include "qtclasses.h"
|
||||
#include "global.h"
|
||||
|
||||
|
|
@ -31,10 +32,27 @@ QLocalServer* startSingleInstanceServer(QString appName) {
|
|||
return server;
|
||||
}
|
||||
|
||||
void closeDebugFileLog() {
|
||||
close_file_log_buffer();
|
||||
}
|
||||
|
||||
/* set_terminate
|
||||
* void closeDebugFileLog2() {
|
||||
* close_file_log_buffer();
|
||||
* abort();
|
||||
* }
|
||||
*/
|
||||
|
||||
int main (int argc, char* argv[]) {
|
||||
//QApplication::setStyle("windowsvista");
|
||||
//Check if running
|
||||
//https://stackoverflow.com/questions/48060989/qt-show-application-if-currently-running
|
||||
writable = initialize_file_log();
|
||||
log_to_file("%d hola", 3);
|
||||
//int bro = fprintf_s(fileLog, "hola\n");
|
||||
//bro = fprintf(fileLog, "hola");
|
||||
atexit(closeDebugFileLog);
|
||||
//std::set_terminate(closeDebugFileLog2);
|
||||
if (!isSingleInstanceRunning("Mixer"))
|
||||
startSingleInstanceServer("Mixer");
|
||||
else exit(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue