Commit 8ed45580648f87f8b405083333411589fb216100

Authored by devel-srv
1 parent 40dc444183
Exists in master

cleaned debug logs

- using verbose_debug config parameter to control debug output
app/component/ExtLibsLoader.php
... ... @@ -33,7 +33,7 @@ class ExtLibsLoader
33 33 {
34 34 if (isset($this->libraries[$lib_name])) {
35 35 $path = $this->libraries[$lib_name];
36   - \Fccn\Lib\FileLogger::debug("ExtLibsLoader::exists there is a record for library [$lib_name], located in: $path");
  36 + #\Fccn\Lib\FileLogger::debug("ExtLibsLoader::exists there is a record for library [$lib_name], located in: $path");
37 37 return file_exists($path);
38 38 }
39 39 return false;
... ...
app/component/LoadExternalJsAction.php
... ... @@ -18,16 +18,23 @@ use Fccn\Lib\Locale as Locale;
18 18 class LoadExternalJsAction
19 19 {
20 20 protected $container;
  21 + protected $verbose_debug;
21 22  
22 23 public function __construct(ContainerInterface $container)
23 24 {
24 25 $this->container = $container;
25   - \Fccn\Lib\FileLogger::debug("LoadExternalJsAction - initialization");
  26 + $this->verbose_debug = SiteConfig::getInstance()->get("verbose_debug", false);
  27 + if($this->verbose_debug){
  28 + FileLogger::debug("LoadExternalJsAction - initialization");
  29 + }
26 30 }
27 31  
28 32 #loads javascript given a name
29 33 public function __invoke(Request $request, Response $response, $args)
30 34 {
  35 + if($this->verbose_debug){
  36 + FileLogger::debug("LoadExternalJsAction - call to invoke with args: ".json_encode($args));
  37 + }
31 38 $loader_srv_name = \Fccn\Lib\SiteConfig::getInstance()->get('ext_libs_loader_service_name');
32 39 if (empty($this->container[$loader_srv_name])) {
33 40 \Fccn\Lib\FileLogger::error("GET script/lib - no loader service found");
... ...