Skip to content

Commit

Permalink
more debug checking
Browse files Browse the repository at this point in the history
  • Loading branch information
alangrafu committed May 12, 2013
1 parent 3260ffa commit 901616b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion classes/Importer.php
Expand Up @@ -127,7 +127,9 @@ public function run(){
}elseif($compType == LS."LodspeakrVisualComponent"){
$this->createViews($inputs);
}else{
Logging::log("Component '$component' (of type $compType) not supported", E_USER_WARNING);
if($conf['debug']){
Logging::log("Component '$component' (of type $compType) not supported", E_USER_WARNING);
}
}
}
$content .= "?>\n";
Expand Down
4 changes: 3 additions & 1 deletion classes/MetaDb.php
Expand Up @@ -35,7 +35,9 @@ public function write($q){
$db = NULL;
}catch(Exception $e){
echo "Can't write in SQLite database. Please check you have granted write permissions to <tt>meta/</tt> and <tt>meta/db.sqlite</tt>.<br/>Also you can check a list of <a href='https://github.com/alangrafu/lodspeakr/wiki/CommonErrors'>common errors</a> and how to <a href='https://github.com/alangrafu/lodspeakr/wiki/Wipe-out-the-database'>wipe out the database</a>'";
Logging::log('Exception exec: '.$e->getMessage(), E_USER_ERROR);
if($conf['debug']){
Logging::log('Exception exec: '.$e->getMessage(), E_USER_ERROR);
}
exit(1);
}
return $results;
Expand Down
6 changes: 4 additions & 2 deletions classes/Utils.php
Expand Up @@ -280,8 +280,10 @@ public static function queryDir($modelDir, &$r, &$f){
if($modelFile != "." && $modelFile != ".." && strpos($modelFile, ".") !== 0){
if(is_dir($modelFile)){
if(strpos('endpoint.', $modelFile) == 0){
Logging::log("Save $modelFile for later, after all the queries in the current directory has been resolved", E_USER_NOTICE);
$subDirs[]=$modelFile;
if($conf['debug']){
Logging::log("Save $modelFile for later, after all the queries in the current directory has been resolved", E_USER_NOTICE);
}
$subDirs[]=$modelFile;
}
}else{
if(preg_match('/\.query$/', $modelFile)){
Expand Down

0 comments on commit 901616b

Please sign in to comment.