Redirect output to ~/Library/Logs/TextMate.log

Hesitant to not use the platform’s logging system (asl), but a simple log file is much simpler, especially when we want users to send us potential debug output.
This commit is contained in:
Allan Odgaard
2012-09-06 14:58:12 +02:00
parent b1f9259cec
commit a19af7ba7e

View File

@@ -23,6 +23,10 @@ static void sig_term_handler (void* unused)
int main (int argc, char const* argv[])
{
std::string const logFile = path::join(path::home(), "Library/Logs/TextMate.log");
FILE* fp = freopen(logFile.c_str(), "w+", stderr);
setlinebuf(fp);
curl_global_init(CURL_GLOBAL_ALL);
oak::application_t::set_support(path::join(path::home(), "Library/Application Support/TextMate"));