Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Seismic
Open ZGY
Commits
a7c0163e
Commit
a7c0163e
authored
Mar 19, 2021
by
Paal Kvamme
Browse files
Allow enabling SDAPI logging using environment variables.
parent
ae179d11
Changes
1
Hide whitespace changes
Inline
Side-by-side
native/src/impl/file_sd.cpp
View file @
a7c0163e
...
...
@@ -24,6 +24,7 @@
#include
"mtguard.h"
#include
"../exception.h"
#include
"../iocontext.h"
#include
"environment.h"
#include
<vector>
#include
<string>
...
...
@@ -977,16 +978,18 @@ SeismicStoreFile::SeismicStoreFile(const std::string& filename, OpenMode mode, c
//TODO-Low: if (!context->_pedantic.empty())
// extra[Constants::KPedantic] = context->_pedantic;
// TODO-Low enable logging for manager and/or dataset
bool
sd_mgr_log
=
Environment
::
getNumericEnv
(
"OPENZGY_SDMANAGER_LOG"
,
0
)
>
0
;
bool
sd_ds_log
=
Environment
::
getNumericEnv
(
"OPENZGY_SDDATASET_LOG"
,
0
)
>
0
;
auto
manager
=
std
::
make_shared
<
seismicdrive
::
SDManager
>
(
context
->
_sdurl
,
context
->
_sdapikey
);
manager
->
setLogStatus
(
sd_mgr_log
);
std
::
shared_ptr
<
seismicdrive
::
SDGenericDataset
>
dataset
;
if
(
mode
!=
OpenMode
::
Closed
)
{
_logger
(
5
,
std
::
stringstream
()
<<
"make dataset using manager "
<<
std
::
hex
<<
(
std
::
uint64_t
)
manager
.
get
());
dataset
=
std
::
make_shared
<
seismicdrive
::
SDGenericDataset
>
(
manager
.
get
(),
filename
);
(
manager
.
get
(),
filename
,
sd_ds_log
);
_logger
(
5
,
"dataset ok"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment