[Mapbender-commits] r8078 - in trunk/mapbender: conf core http/classes http/extensions http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Aug 28 17:10:36 EDT 2011


Author: astrid_emde
Date: 2011-08-28 14:10:36 -0700 (Sun, 28 Aug 2011)
New Revision: 8078

Modified:
   trunk/mapbender/conf/mapbender.conf-dist
   trunk/mapbender/core/system.php
   trunk/mapbender/http/classes/class_log.php
   trunk/mapbender/http/classes/class_mb_exception.php
   trunk/mapbender/http/extensions/ext_weldMaps.php
   trunk/mapbender/http/javascripts/mod_log.js
Log:
define directory for log files in mapbender.conf and not in system.php #864

Modified: trunk/mapbender/conf/mapbender.conf-dist
===================================================================
--- trunk/mapbender/conf/mapbender.conf-dist	2011-08-28 14:35:04 UTC (rev 8077)
+++ trunk/mapbender/conf/mapbender.conf-dist	2011-08-28 21:10:36 UTC (rev 8078)
@@ -33,6 +33,11 @@
 define("TMPDIR", "../tmp");
 
 # --------------------------------------------
+# directory for log files
+# --------------------------------------------
+define("LOG_DIR", dirname(__FILE__) . "/../log/");
+
+# --------------------------------------------
 # URL to login
 # --------------------------------------------
 define("LOGIN", "http://localhost/mapbender/frames/login.php");

Modified: trunk/mapbender/core/system.php
===================================================================
--- trunk/mapbender/core/system.php	2011-08-28 14:35:04 UTC (rev 8077)
+++ trunk/mapbender/core/system.php	2011-08-28 21:10:36 UTC (rev 8078)
@@ -205,7 +205,7 @@
 //
 // class for error handling
 //
-DEFINE("LOG_DIR", dirname(__FILE__) . "/../log/");
+if (!defined("LOG_DIR")) define("LOG_DIR", dirname(__FILE__) . "/../log/");
 require_once dirname(__FILE__)."/../http/classes/class_mb_exception.php";
 
 //
@@ -223,4 +223,4 @@
 // Default is 100k
 #defined("WFS_RESPONSE_SIZE_LIMIT") || define("WFS_RESPONSE_SIZE_LIMIT", 1024*100);
 
-?>
\ No newline at end of file
+?>

Modified: trunk/mapbender/http/classes/class_log.php
===================================================================
--- trunk/mapbender/http/classes/class_log.php	2011-08-28 14:35:04 UTC (rev 8077)
+++ trunk/mapbender/http/classes/class_log.php	2011-08-28 21:10:36 UTC (rev 8078)
@@ -8,7 +8,7 @@
 require_once(dirname(__FILE__)."/../../core/globalSettings.php");
 
 class log {
-	var $dir = "../../log/";
+	var $dir = LOG_DIR;
 	var $log_username = true;
 
 	var $url = array();

Modified: trunk/mapbender/http/classes/class_mb_exception.php
===================================================================
--- trunk/mapbender/http/classes/class_mb_exception.php	2011-08-28 14:35:04 UTC (rev 8077)
+++ trunk/mapbender/http/classes/class_mb_exception.php	2011-08-28 21:10:36 UTC (rev 8078)
@@ -21,7 +21,7 @@
 require_once(dirname(__FILE__)."/../classes/class_mb_log.php");
 
 /**
- * Logs messages to a specified file, for example "../log/mb_error_log_<date>.log"
+ * Logs messages to a specified file, for example "../log/mb_error_log_<date>.log". Define LOG_DIR in mapbender.conf
  * 
  * @package exceptionHandling
  */
@@ -42,4 +42,4 @@
 	 */
 	private $level = "error";
 }
-?>
\ No newline at end of file
+?>

Modified: trunk/mapbender/http/extensions/ext_weldMaps.php
===================================================================
--- trunk/mapbender/http/extensions/ext_weldMaps.php	2011-08-28 14:35:04 UTC (rev 8077)
+++ trunk/mapbender/http/extensions/ext_weldMaps.php	2011-08-28 21:10:36 UTC (rev 8078)
@@ -36,7 +36,7 @@
 	function weldMaps($map_urls, $factor){
       #{ file | false }
 
-      #$debug_file = "/data/mapbender2/log/print.log";
+      #$debug_file = LOG_DIR."/print.log";
       $debug_file = false;
       
       settype($factor, "integer");     
@@ -117,4 +117,4 @@
 
 $map_urls = explode("###",Mapbender::session()->get("mb_print_url"));
 $output = new weldMaps($map_urls, Mapbender::session()->get("mb_print_resolution"));
-?>
\ No newline at end of file
+?>

Modified: trunk/mapbender/http/javascripts/mod_log.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_log.js	2011-08-28 14:35:04 UTC (rev 8077)
+++ trunk/mapbender/http/javascripts/mod_log.js	2011-08-28 21:10:36 UTC (rev 8078)
@@ -4,7 +4,7 @@
  * Description:
  * Logs the accesses to the guis in the database or a logfile
  * The accesses will be written in the mapbender database on table mb_log or 
- * into mapbender/log/mb_access_$DATE.log.
+ * into LOG_DIR/mb_access_$DATE.log.
  * The log mode can be set via the element_var logtype (file or db). 
  * 
  * Files:



More information about the Mapbender_commits mailing list