Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
wenqing
ogs
Commits
888ab0ad
Commit
888ab0ad
authored
Jun 21, 2020
by
Dmitry Yu. Naumov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[App] Add log level setting to partmesh.
parent
2e6444db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp
...ns/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp
+22
-2
No files found.
Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp
View file @
888ab0ad
...
...
@@ -12,14 +12,14 @@
*/
#include <spdlog/spdlog.h>
#include <tclap/CmdLine.h>
#include "InfoLib/GitInfo.h"
#include "BaseLib/CPUTime.h"
#include "BaseLib/FileTools.h"
#include "BaseLib/RunTime.h"
#include "InfoLib/GitInfo.h"
#include "MeshLib/IO/readMeshFromFile.h"
#include "Metis.h"
#include "NodeWiseMeshPartitioner.h"
...
...
@@ -75,6 +75,19 @@ int main(int argc, char* argv[])
TCLAP
::
SwitchArg
ascii_flag
(
"a"
,
"ascii"
,
"Enable ASCII output."
,
false
);
cmd
.
add
(
ascii_flag
);
TCLAP
::
ValueArg
<
std
::
string
>
log_level_arg
(
"l"
,
"log-level"
,
"the verbosity of logging "
"messages: none, error, warn, "
"info, debug, all"
,
false
,
#ifdef NDEBUG
"info"
,
#else
"all"
,
#endif
"LOG_LEVEL"
);
cmd
.
add
(
log_level_arg
);
// All the remaining arguments are used as file names for boundary/subdomain
// meshes.
TCLAP
::
UnlabeledMultiArg
<
std
::
string
>
other_meshes_filenames_arg
(
...
...
@@ -83,6 +96,13 @@ int main(int argc, char* argv[])
cmd
.
parse
(
argc
,
argv
);
BaseLib
::
setConsoleLogLevel
(
log_level_arg
.
getValue
());
spdlog
::
set_pattern
(
"%^%l:%$ %v"
);
spdlog
::
set_error_handler
([](
const
std
::
string
&
msg
)
{
std
::
cerr
<<
"spdlog error: "
<<
msg
<<
std
::
endl
;
OGS_FATAL
(
"spdlog logger error occured."
);
});
BaseLib
::
RunTime
run_timer
;
run_timer
.
start
();
BaseLib
::
CPUTime
CPU_timer
;
...
...
Write
Preview
Markdown
is supported
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