Skip to content

Commit

Permalink
only log sqlite calls to PDAL logger with PDAL_SQLITE_LOG environment…
Browse files Browse the repository at this point in the history
… variable set
  • Loading branch information
hobu committed Jun 30, 2019
1 parent 84ddcd7 commit e3d83eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/sqlite/io/SQLiteCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ class SQLite
{
m_log->get(LogLevel::Debug3) << "Setting up config " << std::endl;
sqlite3_shutdown();
sqlite3_config(SQLITE_CONFIG_LOG, log_callback, this);

std::string doLogging;
Utils::getenv("PDAL_SQLITE_LOG", doLogging);
if (doLogging.size())
sqlite3_config(SQLITE_CONFIG_LOG, log_callback, this);

sqlite3_initialize();
m_log->get(LogLevel::Debug3) << "Set up config " << std::endl;
m_log->get(LogLevel::Debug3) << "SQLite version: " << sqlite3_libversion() << std::endl;
Expand Down

0 comments on commit e3d83eb

Please sign in to comment.