Hi there,
Is there any way to set up CC to log the console output to a file? This is especially important in case CC crashes and i've done work i don't want to lose (in my case, recording transformation matrices is important). Yes, I can copy and paste manually, but if i forget sometimes, etc...
thanks,
allie
log console to file?
Re: log console to file?
There's only the '-LOG_FILE' option, would it work for you? (http://www.cloudcompare.org/doc/wiki/in ... _line_mode)
(and if CC crashes, just tell us ;)
(and if CC crashes, just tell us ;)
Daniel, CloudCompare admin
Re: log console to file?
Thanks Daniel - any way to run the full GUI with the logfile option turned on? cloudcompare -LOG_FILE "temp.txt" just runs the cli and then closes...
Re: log console to file?
Oh sorry I misunderstood. Then no, this option is not available with the GUI version.
Daniel, CloudCompare admin
Re: log console to file?
In mainwindow.cpp MainWindow::MainWindow(),add follow code.
Code: Select all
//Console
ccConsole::Init(m_UI->consoleWidget, this, this);
m_UI->actionEnableQtWarnings->setChecked(ccConsole::QtMessagesEnabled());
QString applicationPath = QApplication::applicationDirPath();
QString logDirPath = applicationPath + "/logs/";
QDir logPathDir(logDirPath);
if (!logPathDir.exists())
{
logPathDir.mkpath(logDirPath);
}
QString currentDateTime = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss");
QString logPath = logDirPath + currentDateTime + ".log";
ccConsole* consoleObj = ccConsole::TheInstance(false);
consoleObj->setLogFile(logPath);