assert(!_crashlog_fd);
DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("Creating AU Log: %1\n", fn));
if (!(_crashlog_fd = fopen(fn.c_str(), "w"))) {
- PBD::error << "Cannot create AU error-log\n";
+ PBD::error << "Cannot create AU error-log" << fn << "\n";
+ cerr << "Cannot create AU error-log" << fn << "\n";
}
}
void
AUPluginInfo::au_crashlog (std::string msg)
{
- assert(_crashlog_fd);
- fprintf(_crashlog_fd, "AU: %s\n", msg.c_str());
- ::fflush(_crashlog_fd);
+ if (!_crashlog_fd) {
+ fprintf(stderr, "AU: %s\n", msg.c_str());
+ } else {
+ fprintf(_crashlog_fd, "AU: %s\n", msg.c_str());
+ ::fflush(_crashlog_fd);
+ }
}
void