Skip to content

Commit

Permalink
adjust the log level for released version
Browse files Browse the repository at this point in the history
Change-Id: Id874cc5b84a1c236dc00d9430867a913b0417beb
  • Loading branch information
lanewei120 committed Jul 16, 2022
1 parent 4544dad commit 0f987e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/BambuStudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,6 @@ int CLI::run(int argc, char **argv)

bool CLI::setup(int argc, char **argv)
{
#if !BBL_RELEASE_TO_PUBLIC
{
Slic3r::set_logging_level(1);
const char *loglevel = boost::nowide::getenv("BBL_LOGLEVEL");
Expand All @@ -1459,10 +1458,6 @@ bool CLI::setup(int argc, char **argv)
boost::nowide::cerr << "Invalid BBL_LOGLEVEL environment variable: " << loglevel << std::endl;
}
}
#else
//set to fatal
Slic3r::set_logging_level(0);
#endif

// Detect the operating system flavor after SLIC3R_LOGLEVEL is set.
detect_platform();
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/AppConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void AppConfig::set_defaults()
set_bool("developer_mode", false);

if (get("severity_level").empty())
set("severity_level", "trace");
set("severity_level", "info");

if (get("dump_video").empty())
set_bool("dump_video", false);
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/GUI_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1417,14 +1417,15 @@ bool GUI_App::OnInit()
bool GUI_App::on_init_inner()
{
//start log here
#if !BBL_RELEASE_TO_PUBLIC
std::time_t t = std::time(0);
std::tm* now_time = std::localtime(&t);
std::stringstream buf;
buf << std::put_time(now_time, "debug_%a_%b_%d_%H_%M_%S.log");
std::string log_filename = buf.str();
#if !BBL_RELEASE_TO_PUBLIC
set_log_path_and_level(log_filename, 5);
#else
set_log_path_and_level(log_filename, 3);
#endif

// Set initialization of image handlers before any UI actions - See GH issue #7469
Expand Down

0 comments on commit 0f987e9

Please sign in to comment.