Commit 6d0968f0 authored by Paal Kvamme's avatar Paal Kvamme
Browse files

Trivial change to the prefix used by some of the OPENZGY_VERBOSE messages.

parent c582821c
......@@ -492,7 +492,7 @@ ZgyInternalBulk::ZgyInternalBulk(
, _is_bad(false)
, _written_sample_min(std::numeric_limits<double>::infinity())
, _written_sample_max(-std::numeric_limits<double>::infinity())
, _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-bulk:", ""))
, _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-bulk: ", ""))
, _ptimer_st(new SummaryPrintingTimerEx("writeAligned[S]"))
, _ptimer_mt(new SummaryPrintingTimerEx("writeAligned[M]"))
, _ststimer(new SummaryPrintingTimerEx("scaleToStorage"))
......
......@@ -1076,7 +1076,7 @@ SeismicStoreFile::SeismicStoreFile(const std::string& filename, OpenMode mode, c
static std::mutex mutex;
std::lock_guard<std::mutex> lk(mutex);
if (!_loggerfn)
_loggerfn = LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "zgy: ", "");
_loggerfn = LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-cloud: ", "");
}
_logger(3, std::stringstream() << "SeismicStoreFile("
......
......@@ -1673,7 +1673,7 @@ public:
* Open for read
*/
ZgyInternalMeta::ZgyInternalMeta(const std::shared_ptr<FileADT>& file, const LoggerFn& logger)
: _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-meta:", ""))
: _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-meta: ", ""))
, _is_bad(false)
{
initFromOpenFile(file);
......@@ -1683,7 +1683,7 @@ ZgyInternalMeta::ZgyInternalMeta(const std::shared_ptr<FileADT>& file, const Log
* Open for write
*/
ZgyInternalMeta::ZgyInternalMeta(const ZgyInternalWriterArgs& args_in, bool compress, const LoggerFn& logger)
: _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-meta:", ""))
: _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-meta: ", ""))
, _is_bad(false)
{
initFromScratch(args_in, compress);
......@@ -1693,7 +1693,7 @@ ZgyInternalMeta::ZgyInternalMeta(const ZgyInternalWriterArgs& args_in, bool comp
* Open for update
*/
ZgyInternalMeta::ZgyInternalMeta(const std::shared_ptr<FileADT>& file, const ZgyInternalWriterArgs& args_in, bool compress, const LoggerFn& logger)
: _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-meta:", ""))
: _loggerfn(logger ? logger : LoggerBase::standardCallback(LoggerBase::getVerboseFromEnv("OPENZGY_VERBOSE"), "openzgy-meta: ", ""))
, _is_bad(false)
{
ZgyInternalWriterArgs args = validateOpenForUpdate(args_in);
......
......@@ -1846,7 +1846,7 @@ ZgyReader_setverbose(ZgyClass *self, PyObject *value, void *closure)
}
long newvalue = PyLong_AsLong(value);
self->pimpl_->logger_verbose_ = static_cast<int>(newvalue);
self->pimpl_->logger_ = LoggerBase::standardCallback(self->pimpl_->logger_verbose_, "openzgy: ", "");
self->pimpl_->logger_ = LoggerBase::standardCallback(self->pimpl_->logger_verbose_, "openzgy-python: ", "");
// Nitpick: not distinguishing between reader and writer in prefix,
// as happens when logger is set from environment variable.
// Because the same setter is used in both classes.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment