}
if (g_conf.log_to_file) {
- if (_read_ofile_config()) {
+ if (_read_ofile_config() == 0) {
flags |= DOUTSB_FLAG_OFILE;
}
}
int ret = create_symlink(new_opath, isym_path);
if (ret) {
ostringstream oss;
- oss << __func__ << ": failed to (re)create instance symlink";
+ oss << __func__ << ": failed to (re)create instance symlink\n";
primitive_log(oss.str());
return ret;
}
int ret = create_symlink(new_opath, rsym_path);
if (ret) {
ostringstream oss;
- oss << __func__ << ": failed to (re)create rank symlink";
+ oss << __func__ << ": failed to (re)create rank symlink\n";
primitive_log(oss.str());
return ret;
}
}
template <typename charT, typename traits>
-bool DoutStreambuf<charT, traits>::_read_ofile_config()
+int DoutStreambuf<charT, traits>::_read_ofile_config()
{
int ret;
ostringstream oss;
oss << __func__ << ": _calculate_opath failed.\n";
primitive_log(oss.str());
- return false;
+ return 1;
}
if (empty(g_conf.log_file) && g_conf.log_per_instance) {
ret = _rotate_files(isym_path);
if (ret) {
ostringstream oss;
- oss << __func__ << ": failed to rotate instance symlinks";
+ oss << __func__ << ": failed to rotate instance symlinks\n";
primitive_log(oss.str());
return ret;
}
ret = create_symlink(opath, isym_path);
if (ret) {
ostringstream oss;
- oss << __func__ << ": failed to create instance symlink";
+ oss << __func__ << ": failed to create instance symlink\n";
primitive_log(oss.str());
return ret;
}
oss << "failed to open log file '" << opath << "': "
<< cpp_strerror(err) << "\n";
primitive_log(oss.str());
- return false;
+ return err;
}
- return true;
+ return 0;
}
template <typename charT, typename traits>