aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-07-09 21:39:43 -0400
committerDeterminant <[email protected]>2018-07-09 21:39:43 -0400
commitc14b26fadcd643792960839bd1e05d7cbd39e123 (patch)
treefefc8f2d4cc654ad93c931287f8a25b1f64bccc7 /src
parent97956c08e679299e9900e7ea1f3b42607f2f51c6 (diff)
...
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 19ec01c..a1086f8 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -80,10 +80,6 @@ SalticidaeError::SalticidaeError(const std::string &fmt, ...) {
}
}
-SalticidaeError::operator std::string() const {
- return msg;
-}
-
void Logger::write(const char *tag, const char *fmt, va_list ap) {
fprintf(output, "%s [%s %s] ", get_current_datetime().c_str(), prefix, tag);
vfprintf(output, fmt, ap);
@@ -223,10 +219,11 @@ size_t Config::parse(int argc, char **argv) {
update(*getopt_order[id], optarg);
if (id == conf_idx)
{
- if (load(conf_fname))
- SALTICIDAE_LOG_INFO("load configuration from %s", conf_fname.c_str());
+ auto &fname = opt_val_conf.get();
+ if (load(fname))
+ SALTICIDAE_LOG_INFO("loading extra configuration from %s", fname.c_str());
else
- SALTICIDAE_LOG_INFO("configuration file %s not found", conf_fname.c_str());
+ SALTICIDAE_LOG_INFO("configuration file %s not found", fname.c_str());
}
}
return optind;