diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp index 101b831a298f1fd9741856e202a73a35da7f2d0c..ca824edb3993349208fa75e1d21fbb4b303c6987 100644 --- a/Common/Gmsh.cpp +++ b/Common/Gmsh.cpp @@ -6,6 +6,7 @@ #include <string> #include <time.h> #include "GmshConfig.h" +#include "GmshVersion.h" #include "GmshMessage.h" #include "GmshDefines.h" #include "GmshRemote.h" @@ -133,9 +134,10 @@ int GmshFinalize() int GmshBatch() { - Msg::Info("Running '%s' [%d node(s), max. %d thread(s)]", - Msg::GetCommandLineArgs().c_str(), - Msg::GetCommSize(), Msg::GetMaxThreads()); + Msg::Info("Running '%s' [Gmsh %s, %d node%s, max. %d thread%s]", + Msg::GetCommandLineArgs().c_str(), GMSH_VERSION, + Msg::GetCommSize(), Msg::GetCommSize() > 1 ? "s" : "", + Msg::GetMaxThreads(), Msg::GetMaxThreads() > 1 ? "s" : ""); Msg::Info("Started on %s", Msg::GetLaunchDate().c_str()); OpenProject(GModel::current()->getFileName()); diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index 8b496f961014d4b05dc2fbd8c4b65284b5fc8aa7..8b1623aead1286fe50c8dac5df188d9418733044 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -222,7 +222,7 @@ void Msg::Fatal(const char *fmt, ...) if(CTX::instance()->terminal){ const char *c0 = "", *c1 = ""; if(!streamIsFile(stderr) && streamIsVT100(stderr)){ - c0 = "\33[31m"; c1 = "\33[0m"; // red + c0 = "\33[1m\33[31m"; c1 = "\33[0m"; // bold red } if(_commSize > 1) fprintf(stderr, "%sFatal : [On processor %d] %s%s\n", c0, _commRank, str, c1); @@ -262,7 +262,7 @@ void Msg::Error(const char *fmt, ...) if(CTX::instance()->terminal){ const char *c0 = "", *c1 = ""; if(!streamIsFile(stderr) && streamIsVT100(stderr)){ - c0 = "\33[31m"; c1 = "\33[0m"; // red + c0 = "\33[1m\33[31m"; c1 = "\33[0m"; // bold red } if(_commSize > 1) fprintf(stderr, "%sError : [On processor %d] %s%s\n", c0, _commRank, str, c1); @@ -549,10 +549,14 @@ void Msg::PrintErrorCounter(const char *title) #endif if(CTX::instance()->terminal){ - fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n", (prefix + line).c_str(), + const char *c0 = "", *c1 = ""; + if(!streamIsFile(stderr) && streamIsVT100(stderr)){ + c0 = "\33[31m"; c1 = "\33[0m"; // red + } + fprintf(stderr, "%s%s\n%s\n%s\n%s\n%s\n%s%s\n", c0, (prefix + line).c_str(), (prefix + title).c_str(), (prefix + warn).c_str(), (prefix + err).c_str(), (prefix + help).c_str(), - (prefix + line).c_str()); + (prefix + line).c_str(), c1); fflush(stderr); } }