Index: branches/version-2_12-dev/data/class/SC_Customer.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Customer.php	(revision 21571)
+++ branches/version-2_12-dev/data/class/SC_Customer.php	(revision 21582)
@@ -206,5 +206,5 @@
         $_SESSION['customer'] = $this->customer_data;
         // セッション情報の保存
-        GC_Utils_Ex::gfPrintLog('access : user='.$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE);
+        GC_Utils_Ex::gfPrintLog('access : user='.$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE, false);
     }
 
@@ -220,5 +220,5 @@
         $objSiteSess->unsetUniqId();
         // ログに記録する
-        GC_Utils_Ex::gfPrintLog('logout : user='.$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE);
+        GC_Utils_Ex::gfPrintLog('logout : user='.$this->customer_data['customer_id'] ."\t"."ip=". $this->getRemoteHost(), CUSTOMER_LOG_REALFILE, false);
     }
 
Index: branches/version-2_12-dev/data/class/helper/SC_Helper_Plugin.php
===================================================================
--- branches/version-2_12-dev/data/class/helper/SC_Helper_Plugin.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_Plugin.php	(revision 21582)
@@ -47,5 +47,5 @@
 
         if (!defined('CONFIG_REALFILE') || !file_exists(CONFIG_REALFILE)) return; // インストール前
-        if (SC_Utils_Ex::sfIsInstallFunction()) return; // インストール中
+        if (GC_Utils_Ex::isInstallFunction()) return; // インストール中
         if ($plugin_activate_flg === false) return;
         // 有効なプラグインを取得
Index: branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php
===================================================================
--- branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 21564)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 21582)
@@ -1409,5 +1409,5 @@
 
             $sqls = file_get_contents($sqlFilePath);
-            if ($sqls === false) SC_Utils_Ex::sfDispException('ファイルは存在するが読み込めない');
+            if ($sqls === false) trigger_error('ファイルは存在するが読み込めない', E_USER_ERROR);
 
             foreach (explode(';', $sqls) as $sql) {
Index: branches/version-2_12-dev/data/class/helper/SC_Helper_HandleError.php
===================================================================
--- branches/version-2_12-dev/data/class/helper/SC_Helper_HandleError.php	(revision 21527)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_HandleError.php	(revision 21582)
@@ -25,5 +25,7 @@
  * エラーハンドリングのクラス
  *
- * @package Page
+ * 依存するクラスに構文エラーがあると、捕捉できない。よって、依存は最小に留めること。
+ * 現状 GC_Utils_Ex(GC_Utils) に依存しているため、その中で構文エラーは捕捉できない。
+ * @package Helper
  * @version $Id$
  */
@@ -87,4 +89,6 @@
         }
 
+        $error_type_name = GC_Utils_Ex::getErrorTypeName($errno);
+
         $now = date('Y/m/d H:i:s');
         // 本来 realpath() で正規化したいところだが、NULL を返すケースがあるため避けている (#1618)
@@ -92,8 +96,8 @@
         switch ($errno) {
             case E_USER_ERROR:
-                $message = $now . " [$errfile:$errline] FATAL Error($errno) $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n";
-                error_log($message, 3, $log_file_path);
-
-                self::displaySystemError($errstr);
+                $message = "Fatal error($error_type_name): $errstr on [$errfile($errline)]";
+                GC_Utils_Ex::gfPrintLog($message, ERROR_LOG_REALFILE, true);
+
+                SC_Helper_HandleError_Ex::displaySystemError($message);
                 exit(1);
                 break;
@@ -103,6 +107,6 @@
             case E_CORE_WARNING:
             case E_COMPILE_WARNING:
-                $message = $now . " [$errfile:$errline] WARNING($errno) $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n";
-                error_log($message, 3, $log_file_path);
+                $message = "Warning($error_type_name): $errstr on [$errfile($errline)]";
+                GC_Utils_Ex::gfPrintLog($message, ERROR_LOG_REALFILE);
                 return true;
 
@@ -126,13 +130,13 @@
      */
     static function &_fatal_error_handler(&$buffer) {
-        if (preg_match('/<b>(Fatal) error<\/b>: +(.+) in <b>(.+)<\/b> on line <b>(\d+)<\/b><br \/>/i', $buffer, $matches)) {
+        if (preg_match('/<b>(Fatal error)<\/b>: +(.+) in <b>(.+)<\/b> on line <b>(\d+)<\/b><br \/>/i', $buffer, $matches)) {
             $now = date('Y/m/d H:i:s');
-            // 本来 realpath() で正規化したいところだが、NULL を返すケースがあるため避けている (#1618)
+            // realpath() で正規化したいが、NULL を返すケースがあるため避けている (#1618)
             $log_file_path = DATA_REALDIR . 'logs/site.log';
-            $message = $now . " [$matches[3]:$matches[4]] FATAL Error: $matches[2] from ". $_SERVER['REMOTE_ADDR'] . "\n";
-            error_log($message, 3, $log_file_path);
+            $message = "$matches[1]: $matches[2] on [$matches[3]($matches[4])]";
+            GC_Utils_Ex::gfPrintLog($message, ERROR_LOG_REALFILE, true);
             if (DEBUG_MODE !== true) {
                 $url = HTTP_URL . 'error.php';
-                if (defined('ADMIN_FUNCTION') && ADMIN_FUNCTION) {
+                if (defined('ADMIN_FUNCTION') && ADMIN_FUNCTION === true) {
                     $url .= '?admin';
                 }
@@ -174,14 +178,13 @@
         }
 
-        $errstr = "[{$arrError[file]}:{$arrError[line]}] FATAL Error({$arrError[type]}) {$arrError[message]}";
-
-        // ログの書き出し
-        $now = date('Y/m/d H:i:s');
+        $error_type_name = GC_Utils_Ex::getErrorTypeName($arrError['type']);
+        $errstr = "Fatal error($error_type_name): {$arrError[message]} on [{$arrError[file]}({$arrError[line]})]";
+
         // 本来 realpath() で正規化したいところだが、NULL を返すケースがあるため避けている (#1618)
         $log_file_path = DATA_REALDIR . 'logs/site.log';
-        error_log($now . " $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, $log_file_path);
+        GC_Utils_Ex::gfPrintLog($errstr, ERROR_LOG_REALFILE, true);
 
         // エラー画面を表示する
-        self::displaySystemError($errstr);
+        SC_Helper_HandleError_Ex::displaySystemError($errstr);
     }
 
@@ -215,9 +218,5 @@
         $objPage->init();
         if (isset($errstr)) {
-            $objPage->arrDebugMsg[]
-                = "▼▼▼ エラーメッセージ ▼▼▼\n"
-                . $errstr . "\n"
-                . "▲▲▲ エラーメッセージ ▲▲▲\n"
-            ;
+            $objPage->addDebugMsg($errstr);
         }
         $objPage->process();
Index: branches/version-2_12-dev/data/class/SC_Query.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Query.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/SC_Query.php	(revision 21582)
@@ -924,9 +924,6 @@
         $sth =& $this->conn->prepare($sql, $types, $result_types);
         if (PEAR::isError($sth)) {
-            if (!$this->force_run) {
-                trigger_error($this->traceError($sth, $sql), E_USER_ERROR);
-            } else {
-                error_log($this->traceError($sth, $sql), 3, LOG_REALFILE);
-            }
+            $msg = $this->traceError($sth, $sql);
+            $this->error($msg);
         }
         return $sth;
@@ -942,24 +939,13 @@
      */
     function execute(&$sth, $arrVal = array()) {
-        $timeStart = SC_Utils_Ex::sfMicrotimeFloat();
+
+        $arrStartInfo =& $this->lfStartDbTraceLog($sth, $arrVal);
         $affected =& $sth->execute((array)$arrVal);
-
-        // 一定以上時間かかったSQLの場合、ログ出力する。
-        if (defined('SQL_QUERY_LOG_MODE') && SQL_QUERY_LOG_MODE == true) {
-            $timeEnd = SC_Utils_Ex::sfMicrotimeFloat();;
-            $timeExecTime = $timeEnd - $timeStart;
-            if (defined('SQL_QUERY_LOG_MIN_EXEC_TIME') && $timeExecTime >= (float)SQL_QUERY_LOG_MIN_EXEC_TIME) {
-                $logMsg = sprintf("SQL_LOG [%.2fsec]\n%s", $timeExecTime, $sth->query) . "\n";
-                error_log($logMsg, 3, LOG_REALFILE);
-            }
-        }
+        $this->lfEndDbTraceLog($arrStartInfo, $sth, $arrVal);
 
         if (PEAR::isError($affected)) {
             $sql = isset($sth->query) ? $sth->query : '';
-            if (!$this->force_run) {
-                trigger_error($this->traceError($affected, $sql, $arrVal), E_USER_ERROR);
-            } else {
-                error_log($this->traceError($affected, $sql, $arrVal), 3, LOG_REALFILE);
-            }
+            $msg = $this->traceError($affected, $sql, $arrVal);
+            $this->error($msg);
         }
         $this->conn->last_query = stripslashes($sth->query);
@@ -970,4 +956,6 @@
      * エラーの内容をトレースする.
      *
+     * XXX trigger_error で処理する場合、1024文字以内に抑える必要がある。
+     * XXX 重要な情報を先頭に置き、冗長になりすぎないように留意する。
      * @access private
      * @param PEAR::Error $error PEAR::Error インスタンス
@@ -977,25 +965,27 @@
      */
     function traceError($error, $sql = '', $arrVal = false) {
-        $scheme = '';
-        if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
-            $scheme = 'http://';
+        $err = "SQL: [$sql]\n";
+        if ($arrVal !== false) {
+            $err .= 'PlaceHolder: [' . var_export($arrVal, true) . "]\n";
+        }
+        $err .= $error->getMessage() . "\n";
+        $err .= rtrim($error->getUserInfo()) . "\n";
+
+        // PEAR::MDB2 内部のスタックトレースを出力する場合、下記のコメントを外す。
+        // $err .= GC_Utils_Ex::toStringBacktrace($error->getBackTrace());
+
+        return $err;
+    }
+
+    /**
+     * エラー処理
+     */
+    function error($msg) {
+        $msg = "DB処理でエラーが発生しました。\n" . $msg;
+        if (!$this->force_run) {
+            trigger_error($msg, E_USER_ERROR);
         } else {
-            $scheme = 'https://';
-        }
-
-        $err = $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "\n\n"
-            . 'SERVER_ADDR: ' . $_SERVER['SERVER_ADDR'] . "\n"
-            . 'REMOTE_ADDR: ' . $_SERVER['REMOTE_ADDR'] . "\n"
-            . 'USER_AGENT: ' . $_SERVER['HTTP_USER_AGENT'] . "\n\n"
-            . 'SQL: ' . $sql . "\n\n";
-        if ($arrVal !== false) {
-            $err .= 'PlaceHolder: ' . var_export($arrVal, true) . "\n\n";
-        }
-        $err .= $error->getMessage() . "\n\n";
-        $err .= $error->getUserInfo() . "\n\n";
-
-        $err .= SC_Utils_Ex::sfBacktraceToString($error->getBackTrace());
-
-        return $err;
+            GC_Utils_Ex::gfPrintLog($msg, ERROR_LOG_REALFILE, true);
+        }
     }
 
@@ -1030,3 +1020,68 @@
     }
 
+    /**
+     * SQL の実行ログ (トレースログ) を書き出す
+     *
+     * @param string 実行するSQL文
+     * @param array $arrVal プレースホルダに挿入する配列
+     * @return void
+     */
+    private function lfStartDbTraceLog(&$objSth, &$arrVal) {
+        if (!defined('SQL_QUERY_LOG_MODE') || SQL_QUERY_LOG_MODE === 0) {
+            return;
+        }
+        $arrInfo =& $GLOBALS['_SC_Query_TraceLogInfo'];
+        if (!isset($arrInfo['http_request_id'])) {
+            $arrInfo['http_request_id'] = uniqid();
+        }
+
+        $arrStartInfo = array(
+            'http_request_id'   => $arrInfo['http_request_id'],
+            'time_start'        => SC_Utils_Ex::sfMicrotimeFloat(),
+            'count'             => ++$arrInfo['count'],
+        );
+
+        // ログモード1の場合、開始はログに出力しない
+        if (SQL_QUERY_LOG_MODE === 1) {
+            return $arrStartInfo;
+        }
+
+        $msg = "[execute start {$arrStartInfo['http_request_id']}#{$arrStartInfo['count']}]\n"
+             . 'SQL: ' . $objSth->query . "\n"
+             . 'PlaceHolder: ' . var_export($arrVal, true) . "\n";
+        GC_Utils_Ex::gfPrintLog($msg, DB_LOG_REALFILE);
+
+        return $arrStartInfo;
+    }
+
+    /**
+     * SQL の実行ログ (トレースログ) を書き出す
+     *
+     * @param string 実行するSQL文
+     * @param array $arrVal プレースホルダに挿入する配列
+     * @return void
+     */
+    private function lfEndDbTraceLog(&$arrStartInfo, &$objSth, &$arrVal) {
+        if (!defined('SQL_QUERY_LOG_MODE') || SQL_QUERY_LOG_MODE === 0) {
+            return;
+        }
+        $msg = "[execute end {$arrStartInfo['http_request_id']}#{$arrStartInfo['count']}]\n";
+
+        $timeEnd = SC_Utils_Ex::sfMicrotimeFloat();
+        $timeExecTime = $timeEnd - $arrStartInfo['time_start'];
+
+        // ログモード1の場合、
+        if (SQL_QUERY_LOG_MODE === 1) {
+            // 規定時間より速い場合、ログに出力しない
+            if (!defined('SQL_QUERY_LOG_MIN_EXEC_TIME') || $timeExecTime < (float)SQL_QUERY_LOG_MIN_EXEC_TIME) {
+                return;
+            }
+            // 開始時にログ出力していないため、ここで実行内容を出力する
+            $msg .= 'SQL: ' . $objSth->query . "\n";
+            $msg .= 'PlaceHolder: ' . var_export($arrVal, true) . "\n";
+        }
+
+        $msg .= 'execution time: ' . sprintf("%.2f sec", $timeExecTime) . "\n";
+        GC_Utils_Ex::gfPrintLog($msg, DB_LOG_REALFILE);
+    }
 }
Index: branches/version-2_12-dev/data/class/SC_Response.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Response.php	(revision 21479)
+++ branches/version-2_12-dev/data/class/SC_Response.php	(revision 21582)
@@ -134,5 +134,5 @@
         // アプリケーション外へのリダイレクトは扱わない
         if (preg_match($pattern, $url) === 0) {
-            SC_Utils_Ex::sfDispException();
+            trigger_error('', E_USER_ERROR);
         }
 
Index: branches/version-2_12-dev/data/class/util/SC_Utils.php
===================================================================
--- branches/version-2_12-dev/data/class/util/SC_Utils.php	(revision 21564)
+++ branches/version-2_12-dev/data/class/util/SC_Utils.php	(revision 21582)
@@ -161,25 +161,11 @@
 
     /**
-     * 例外エラーページの表示
-     *
-     * @param string $debugMsg デバッグ用のメッセージ
-     * @return void
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 trigger_error($debugMsg, E_USER_ERROR) を使用すること
      */
     function sfDispException($debugMsg = null) {
-        require_once CLASS_EX_REALDIR . 'page_extends/error/LC_Page_Error_SystemError_Ex.php';
-
-        $objPage = new LC_Page_Error_SystemError_Ex();
-        register_shutdown_function(array($objPage, 'destroy'));
-        $objPage->init();
-        if (!is_null($debugMsg)) {
-            $objPage->addDebugMsg($debugMsg);
-        }
-        if (function_exists('debug_backtrace')) {
-            $objPage->backtrace = debug_backtrace();
-        }
-        GC_Utils_Ex::gfPrintLog($objPage->sfGetErrMsg());
-        $objPage->process();
-
-        exit();
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        trigger_error($debugMsg, E_USER_ERROR);
     }
 
@@ -1676,68 +1662,51 @@
 
     /**
-     * 現在の URL を取得する
-     *
-     * @return string 現在のURL
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::getUrl を使用すること
      */
     function sfGetUrl() {
-        $url = '';
-
-        if (SC_Utils_Ex::sfIsHTTPS()) {
-            $url = 'https://';
-        } else {
-            $url = 'http://';
-        }
-
-        $url .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '?' . $_SERVER['QUERY_STRING'];
-
-        return $url;
-    }
-
-    /**
-     * バックトレースをテキスト形式で出力する
-     *
-     * @return string テキストで表現したバックトレース
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        return GC_Utils_Ex::getUrl();
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::toStringBacktrace を使用すること
      */
     function sfBacktraceToString($arrBacktrace) {
-        $string = '';
-
-        foreach (array_reverse($arrBacktrace) as $backtrace) {
-            if (strlen($backtrace['class']) >= 1) {
-                $func = $backtrace['class'] . $backtrace['type'] . $backtrace['function'];
-            } else {
-                $func = $backtrace['function'];
-            }
-
-            $string .= $backtrace['file'] . ' ' . $backtrace['line'] . ':' . $func . "\n";
-        }
-
-        return $string;
-    }
-
-    /**
-     * 管理機能かを判定
-     *
-     * @return bool 管理機能か
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        return GC_Utils_Ex::toStringBacktrace($arrBacktrace);
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::isAdminFunction を使用すること
      */
     function sfIsAdminFunction() {
-        return defined('ADMIN_FUNCTION') && ADMIN_FUNCTION;
-    }
-
-    /**
-     * フロント機能かを判定
-     *
-     * @return bool フロント機能か
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        return GC_Utils_Ex::isAdminFunction();
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::isFrontFunction を使用すること
      */
     function sfIsFrontFunction() {
-        return defined('FRONT_FUNCTION') && FRONT_FUNCTION;
-    }
-
-    /**
-     * インストール機能かを判定
-     *
-     * @return bool インストール機能か
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        return GC_Utils_Ex::isFrontFunction();
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::isInstallFunction を使用すること
      */
     function sfIsInstallFunction() {
-        return defined('INSTALL_FUNCTION') && INSTALL_FUNCTION;
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        return GC_Utils_Ex::isInstallFunction();
     }
 
@@ -1856,8 +1825,8 @@
 
         $xml = $pluginsXml->asXML();
-        if (strlen($xml) == 0) SC_Utils_Ex::sfDispException();
+        if (strlen($xml) == 0) trigger_error('', E_USER_ERROR);
 
         $return = file_put_contents(PLUGIN_REALDIR . 'plugins.xml', $pluginsXml->asXML());
-        if ($return === false) SC_Utils_Ex::sfDispException();
+        if ($return === false) trigger_error('', E_USER_ERROR);
         return $return;
     }
@@ -1871,5 +1840,4 @@
      *
      * PHP4の上位互換用途。
-     * FIXME PHP4でテストする。(現状全くテストしていない。)
      * @param SimpleXMLElement $pluginsXml プラグイン XML
      * @return integer ファイルに書き込まれたバイト数を返します。
Index: branches/version-2_12-dev/data/class/util/GC_Utils.php
===================================================================
--- branches/version-2_12-dev/data/class/util/GC_Utils.php	(revision 21579)
+++ branches/version-2_12-dev/data/class/util/GC_Utils.php	(revision 21582)
@@ -25,4 +25,6 @@
  * 各種ユーティリティクラス.
  *
+ * このクラスはエラーハンドリング処理でも使用している。
+ * よって、このファイルで構文エラーが発生すると、EC-CUBE はエラーを捕捉できない。
  * @package Util
  * @author LOCKON CO.,LTD.
@@ -38,10 +40,8 @@
      */
     function gfDebugLog($obj) {
-        if (DEBUG_MODE === true) {
-            GC_Utils_Ex::gfPrintLog(
-                "*** start Debug ***\n" .
-                print_r($obj, true) .
-                '*** end Debug ***'
-            );
+        if (USE_VERBOSE_LOG === true) {
+            $msg = "DEBUG\n"
+                 . print_r($obj, true);
+            GC_Utils_Ex::gfPrintLog($msg, DEBUG_LOG_REALFILE);
         }
     }
@@ -53,5 +53,5 @@
      * @return string 呼び出し元クラス、関数名、行数の文字列表現
      */
-    function gfGetCallerInfo($forLogInfo=true) {
+    function gfGetCallerInfo($forLogInfo = true) {
         // バックトレースを取得する
         $traces = debug_backtrace(false);
@@ -59,23 +59,66 @@
         if ($forLogInfo === true) {
             $bklv = 3;
-            if( ($traces[3]['class'] === 'LC_Page'
-                || $traces[3]['class'] === 'LC_Page_Admin')
-                && $traces[3]['function'] === 'log')
-            {
+            if (($traces[3]['class'] === 'LC_Page' || $traces[3]['class'] === 'LC_Page_Admin')
+                && $traces[3]['function'] === 'log'
+            ) {
                 $bklv = 4;
             }
         }
-        $str = $traces[$bklv]['class'] . '::' . $traces[$bklv]['function'] . '(' . $traces[$bklv-1]['line'] . ') ';
+        $str = $traces[$bklv]['class'] . '::' . $traces[$bklv]['function'] . '(' . $traces[$bklv - 1]['line'] . ') ';
         return $str;
     }
 
     /**
-     * ログメッセージに、呼び出し元関数名等の情報を付加して返します
-     *
-     * @param string $mess ログメッセージ
-     * @param string $log_level ログレベル('Info' or 'Debug')
-     * @return string ログメッセージに呼び出し元関数名等の情報を付加した文字列
-     */
-    function gfGetLogStr($mess, $log_level='Info') {
+     * デバッグ情報として必要な範囲のバックトレースを取得する
+     *
+     * エラーハンドリングに関わる情報を切り捨てる。
+     */
+    function getDebugBacktrace($arrBacktrace = null) {
+        if (is_null($arrBacktrace)) {
+            $arrBacktrace = debug_backtrace(false);
+        }
+        $arrReturn = array();
+        foreach (array_reverse($arrBacktrace) as $arrLine) {
+            // 言語レベルの致命的エラー時。発生元の情報はトレースできない。(エラーハンドリング処理のみがトレースされる)
+            // 実質的に何も返さない(空配列を返す)意図。
+            if (strlen($arrLine['file']) === 0
+                && ($arrLine['class'] === 'SC_Helper_HandleError' || $arrLine['class'] === 'SC_Helper_HandleError_Ex')
+                && ($arrLine['function'] === 'handle_error' || $arrLine['function'] === 'handle_warning')
+            ) {
+                break 1;
+            }
+
+            $arrReturn[] = $arrLine;
+
+            // エラーハンドリング処理に引き渡した以降の情報は通常不要なので含めない。
+            if (!isset($arrLine['class']) && $arrLine['function'] === 'trigger_error') {
+                break 1;
+            }
+            if (($arrLine['class'] === 'SC_Helper_HandleError' || $arrLine['class'] === 'SC_Helper_HandleError_Ex')
+                && ($arrLine['function'] === 'handle_error' || $arrLine['function'] === 'handle_warning')
+            ) {
+                break 1;
+            }
+            if (($arrLine['class'] === 'SC_Utils' || $arrLine['class'] === 'SC_Utils_Ex')
+                && $arrLine['function'] === 'sfDispException'
+            ) {
+                break 1;
+            }
+            if (($arrLine['class'] === 'GC_Utils' || $arrLine['class'] === 'GC_Utils_Ex')
+                && $arrLine['function'] === 'gfDebugLog'
+            ) {
+                break 1;
+            }
+        }
+        return array_reverse($arrReturn);
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.0
+     */
+    function gfGetLogStr($mess, $log_level = 'Info') {
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
         // メッセージの前に、ログ出力元関数名とログ出力関数呼び出し部分の行数を付与
         $mess = GC_Utils::gfGetCallerInfo(true) . $mess;
@@ -90,76 +133,64 @@
 
     /**
-     * 管理画面用ログ出力
-     *
-     * 管理画面用ログ出力を行ないます
-     * @param string $mess ログメッセージ
-     * @param string $log_level ログレベル('Info' or 'Debug')
-     * @return void
-     */
-    function gfAdminLog($mess, $log_level='Info') {
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::gfPrintLog を使用すること
+     */
+    function gfAdminLog($mess, $log_level = 'Info') {
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
         // ログレベル=Debugの場合は、DEBUG_MODEがtrueの場合のみログ出力する
-        if ($log_level === 'Debug'&& DEBUG_MODE === false) {
+        if ($log_level === 'Debug' && DEBUG_MODE === false) {
             return;
         }
 
-        // ログメッセージに、呼び出し元関数名等の情報を付加する
-        $mess = GC_Utils::gfGetLogStr($mess, $log_level);
-
         // ログ出力
-        // ※現在は管理画面用・フロント用のログ出力とも、同じファイル(site.log)に出力します。
-        // 　分けたい場合は、以下の関数呼び出しの第２引数にファイルパスを指定してください
-        GC_Utils_Ex::gfPrintLog($mess);
-    }
-
-    /**
-     * フロント用ログ出力
-     *
-     * フロント用ログ出力を行ないます
-     * @param string $mess ログメッセージ
-     * @param string $log_level ログレベル('Info' or 'Debug')
-     * @return void
-     */
-    function gfFrontLog($mess, $log_level='Info') {
+        GC_Utils_Ex::gfPrintLog($mess, '', true);
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::gfPrintLog を使用すること
+     */
+    function gfFrontLog($mess, $log_level = 'Info') {
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
         // ログレベル=Debugの場合は、DEBUG_MODEがtrueの場合のみログ出力する
-        if ($log_level === 'Debug'&& DEBUG_MODE === false) {
+        if ($log_level === 'Debug' && DEBUG_MODE === false) {
             return;
         }
 
-        // ログメッセージに、呼び出し元関数名等の情報を付加する
-        $mess = GC_Utils::gfGetLogStr($mess, $log_level);
-
         // ログ出力
-        // ※現在は管理画面用・フロント用のログ出力とも、同じファイル(site.log)に出力します。
-        // 　分けたい場合は、以下の関数呼び出しの第２引数にファイルパスを指定してください
-        GC_Utils_Ex::gfPrintLog($mess);
-    }
-
-    /*----------------------------------------------------------------------
-     * [名称] gfPrintLog
-     * [概要] ログファイルに日時、処理ファイル名、メッセージを出力
-     * [引数] 表示したいメッセージ
-     * [戻値] なし
-     * [依存] なし
-     * [注釈] -
-     *----------------------------------------------------------------------*/
-    function gfPrintLog($mess, $path = '') {
+        GC_Utils_Ex::gfPrintLog($mess, '', true);
+    }
+
+    /**
+     * ログの出力を行う
+     *
+     * エラー・警告は trigger_error() を経由して利用すること。(補足の出力は例外。)
+     * @param string $msg
+     * @param string $path
+     * @param bool $verbose 冗長な出力を行うか
+     */
+    function gfPrintLog($msg, $path = '', $verbose = USE_VERBOSE_LOG) {
         // 日付の取得
         $today = date('Y/m/d H:i:s');
         // 出力パスの作成
-        if ($path == '') {
-            $path = LOG_REALFILE;
-        }
-
-        // エスケープされている文字をもとに戻す
-        $trans_tbl = get_html_translation_table (HTML_ENTITIES);
-        $trans_tbl = array_flip ($trans_tbl);
-        $mess = strtr($mess, $trans_tbl);
-
-        $fp = fopen($path, 'a+');
-        if ($fp) {
-            $string = "$today [{$_SERVER['PHP_SELF']}] $mess from {$_SERVER['REMOTE_ADDR']}\n";
-            fwrite($fp, $string);
-            fclose($fp);
-        }
+
+        if (strlen($path) === 0) {
+            $path = GC_Utils_Ex::isAdminFunction() ? ADMIN_LOG_REALFILE : LOG_REALFILE;
+        }
+
+        $msg = "$today [{$_SERVER['PHP_SELF']}] $msg from {$_SERVER['REMOTE_ADDR']}\n";
+        if ($verbose) {
+            if (GC_Utils_Ex::isFrontFunction()) {
+                $msg .= 'customer_id = ' . $_SESSION['customer']['customer_id'] . "\n";
+            }
+            if (GC_Utils_Ex::isAdminFunction()) {
+                $msg .= 'login_id = ' . $_SESSION['login_id'] . '(' . $_SESSION['authority'] . ')' . '[' . session_id() . ']' . "\n";
+            }
+            $msg .= GC_Utils_Ex::toStringBacktrace(GC_Utils_Ex::getDebugBacktrace());
+        }
+
+        error_log($msg, 3, $path);
 
         // ログテーション
@@ -253,3 +284,108 @@
         return implode(', ', $mailaddrs); //複数アドレスはカンマ区切りにする
     }
+
+    /**
+     * バックトレースをテキスト形式で出力する
+     *
+     * 現状スタックトレースの形で出力している。
+     * @param array $arrBacktrace バックトレース
+     * @return string テキストで表現したバックトレース
+     */
+    function toStringBacktrace($arrBacktrace) {
+        $string = '';
+
+        foreach (array_reverse($arrBacktrace) as $backtrace) {
+            if (strlen($backtrace['class']) >= 1) {
+                $func = $backtrace['class'] . $backtrace['type'] . $backtrace['function'];
+            } else {
+                $func = $backtrace['function'];
+            }
+
+            $string .= $backtrace['file'] . '(' . $backtrace['line'] . '): ' . $func . "\n";
+        }
+
+        return $string;
+    }
+
+    /**
+     * エラー型から該当する定数名を取得する
+     *
+     * 該当する定数がない場合、$error_type を返す。
+     * @param integer $error_type エラー型
+     * @return string|integer エラー定数名
+     */
+    function getErrorTypeName($error_type) {
+        $arrDefinedConstants = get_defined_constants(true);
+
+        // PHP の歴史対応
+        $arrDefinedCoreConstants = array();
+        // PHP >= 5.3.1, PHP == 5.3.0 (not Windows)
+        if (isset($arrDefinedConstants['Core'])) {
+            $arrDefinedCoreConstants = $arrDefinedConstants['Core'];
+        }
+        // PHP < 5.3.0
+        elseif (isset($arrDefinedConstants['internal'])) {
+            $arrDefinedCoreConstants = $arrDefinedConstants['internal'];
+        }
+        // PHP == 5.3.0 (Windows)
+        elseif (isset($arrDefinedConstants['mhash'])) {
+            $arrDefinedCoreConstants = $arrDefinedConstants['mhash'];
+        }
+
+        foreach ($arrDefinedCoreConstants as $constant_name => $constant_value) {
+            if (substr($constant_name, 0, 2) === 'E_' && $constant_value == $error_type) {
+                return $constant_name;
+            }
+        }
+        return $error_type;
+    }
+
+    /**
+     * 現在の URL を取得する
+     *
+     * @return string 現在のURL
+     */
+    function getUrl() {
+        $url = '';
+
+        if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
+            $url = 'https://';
+        } else {
+            $url = 'http://';
+        }
+
+        $url .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+        if (strlen($_SERVER['QUERY_STRING']) >= 1) {
+            $url .= '?' . $_SERVER['QUERY_STRING'];
+        }
+
+        return $url;
+    }
+
+    /**
+     * 管理機能かを判定
+     *
+     * @return bool 管理機能か
+     */
+    function isAdminFunction() {
+        return defined('ADMIN_FUNCTION') && ADMIN_FUNCTION === true;
+    }
+
+    /**
+     * フロント機能かを判定
+     *
+     * @return bool フロント機能か
+     */
+    function isFrontFunction() {
+        return defined('FRONT_FUNCTION') && FRONT_FUNCTION === true;
+    }
+
+    /**
+     * インストール機能かを判定
+     *
+     * @return bool インストール機能か
+     */
+    function isInstallFunction() {
+        return defined('INSTALL_FUNCTION') && INSTALL_FUNCTION === true;
+    }
 }
Index: branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php	(revision 21571)
+++ branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Deliv.php	(revision 21582)
@@ -199,5 +199,5 @@
      */
     function registerDeliv($deliv_check, $uniqid, &$objPurchase, &$objCustomer) {
-        $this->log('register deliv. deliv_check=' . $deliv_check, 'Debug');
+        GC_Utils_Ex::gfDebugLog('register deliv. deliv_check=' . $deliv_check);
         $arrValues = array();
         // 会員登録住所がチェックされている場合
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Kiyaku.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Kiyaku.php	(revision 21526)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Kiyaku.php	(revision 21582)
@@ -80,5 +80,5 @@
             $this->arrErr = $this->lfCheckError($mode, $objFormParam);
             if (!empty($this->arrErr['kiyaku_id'])) {
-                SC_Utils_Ex::sfDispException();
+                trigger_error('', E_USER_ERROR);
                 return;
             }
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Payment.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Payment.php	(revision 21514)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Payment.php	(revision 21582)
@@ -79,5 +79,5 @@
             $arrErr = $objFormParam->checkError();
             if (!empty($this->arrErr['payment_id'])) {
-                SC_Utils_Ex::sfDispException();
+                trigger_error('', E_USER_ERROR);
                 return;
             }
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php	(revision 21514)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php	(revision 21582)
@@ -194,5 +194,5 @@
         $ret = $objQuery->update('dtb_baseinfo', $sqlval);
 
-        $this->log('update done.');
+        GC_Utils_Ex::gfPrintLog('dtb_baseinfo に UPDATE を実行しました。');
     }
 
@@ -207,5 +207,5 @@
         $ret = $objQuery->insert('dtb_baseinfo', $sqlval);
 
-        $this->log('insert done.');
+        GC_Utils_Ex::gfPrintLog('dtb_baseinfo に INSERT を実行しました。');
     }
 
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Delivery.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Delivery.php	(revision 21526)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Delivery.php	(revision 21582)
@@ -79,5 +79,5 @@
             $this->arrErr = $this->lfCheckError($mode, $objFormParam);
             if (!empty($this->arrErr['deliv_id'])) {
-                SC_Utils_Ex::sfDispException();
+                trigger_error('', E_USER_ERROR);
                 return;
             }
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_DeliveryInput.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_DeliveryInput.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_DeliveryInput.php	(revision 21582)
@@ -88,5 +88,5 @@
             case 'pre_edit':
                 if (count($this->arrErr) > 0) {
-                    SC_Utils_Ex::sfDispException();
+                    trigger_error('', E_USER_ERROR);
                 }
                 $this->lfGetDelivData($objFormParam);
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Holiday.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Holiday.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Holiday.php	(revision 21582)
@@ -85,5 +85,5 @@
             $this->arrErr = $this->lfCheckError($mode, $objFormParam);
             if (!empty($this->arrErr['holiday_id'])) {
-                SC_Utils_Ex::sfDispException();
+                trigger_error('', E_USER_ERROR);
                 return;
             }
Index: branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php	(revision 21527)
+++ branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php	(revision 21582)
@@ -108,5 +108,5 @@
         if ($this->exec) {
             if (!empty($this->arrErr)) {
-                SC_Utils_Ex::sfDispException();
+                trigger_error('', E_USER_ERROR);
             }
             switch ($this->tpl_mode) {
@@ -287,5 +287,5 @@
         $fp = fopen(ZIP_CSV_UTF8_REALFILE, 'r');
         if (!$fp) {
-            SC_Utils_Ex::sfDispException(ZIP_CSV_UTF8_REALFILE . ' の読み込みに失敗しました。');
+            trigger_error(ZIP_CSV_UTF8_REALFILE . ' の読み込みに失敗しました。', E_USER_ERROR);
         }
         return $fp;
@@ -297,10 +297,10 @@
         $fpr = fopen(ZIP_CSV_REALFILE, 'r');
         if (!$fpr) {
-            SC_Utils_Ex::sfDispException(ZIP_CSV_REALFILE . ' の読み込みに失敗しました。');
+            trigger_error(ZIP_CSV_REALFILE . ' の読み込みに失敗しました。', E_USER_ERROR);
         }
 
         $fpw = fopen(ZIP_CSV_UTF8_REALFILE, 'w');
         if (!$fpw) {
-            SC_Utils_Ex::sfDispException(ZIP_CSV_UTF8_REALFILE . ' を開けません。');
+            trigger_error(ZIP_CSV_UTF8_REALFILE . ' を開けません。', E_USER_ERROR);
         }
 
@@ -353,5 +353,5 @@
         $res = $req->sendRequest();
         if (!$res) {
-            SC_Utils_Ex::sfDispException(ZIP_DOWNLOAD_URL . ' の取得に失敗しました。');
+            trigger_error(ZIP_DOWNLOAD_URL . ' の取得に失敗しました。', E_USER_ERROR);
         }
 
@@ -359,9 +359,9 @@
         $fp = fopen($this->zip_csv_temp_realfile, 'w');
         if (!$fp) {
-            SC_Utils_Ex::sfDispException($this->zip_csv_temp_realfile . ' を開けません。');
+            trigger_error($this->zip_csv_temp_realfile . ' を開けません。', E_USER_ERROR);
         }
         $res = fwrite($fp, $req->getResponseBody());
         if (!$res) {
-            SC_Utils_Ex::sfDispException($this->zip_csv_temp_realfile . ' への書き込みに失敗しました。');
+            trigger_error($this->zip_csv_temp_realfile . ' への書き込みに失敗しました。', E_USER_ERROR);
         }
     }
@@ -375,5 +375,5 @@
         $zip = zip_open($this->zip_csv_temp_realfile);
         if (!is_resource($zip)) {
-            SC_Utils_Ex::sfDispException($this->zip_csv_temp_realfile . ' をオープンできません。');
+            trigger_error($this->zip_csv_temp_realfile . ' をオープンできません。', E_USER_ERROR);
         }
 
@@ -383,5 +383,5 @@
 
         if (!$entry) {
-            SC_Utils_Ex::sfDispException($this->zip_csv_temp_realfile . ' に対象ファイルが見つかりません。');
+            trigger_error($this->zip_csv_temp_realfile . ' に対象ファイルが見つかりません。', E_USER_ERROR);
         }
 
@@ -391,15 +391,15 @@
         $res = zip_entry_open($zip, $entry, 'rb');
         if (!$res) {
-            SC_Utils_Ex::sfDispException($this->zip_csv_temp_realfile . ' の展開に失敗しました。');
+            trigger_error($this->zip_csv_temp_realfile . ' の展開に失敗しました。', E_USER_ERROR);
         }
 
         $fp = fopen($tmp_csv_realfile, 'w');
         if (!$fp) {
-            SC_Utils_Ex::sfDispException($tmp_csv_realfile . ' を開けません。');
+            trigger_error($tmp_csv_realfile . ' を開けません。', E_USER_ERROR);
         }
 
         $res = fwrite($fp, zip_entry_read($entry, zip_entry_filesize($entry)));
         if ($res === FALSE) {
-            SC_Utils_Ex::sfDispException($tmp_csv_realfile . ' の書き込みに失敗しました。');
+            trigger_error($tmp_csv_realfile . ' の書き込みに失敗しました。', E_USER_ERROR);
         }
 
@@ -410,5 +410,5 @@
         $res = unlink(ZIP_CSV_REALFILE);
         if (!$res) {
-            SC_Utils_Ex::sfDispException(ZIP_CSV_REALFILE . ' を削除できません。');
+            trigger_error(ZIP_CSV_REALFILE . ' を削除できません。', E_USER_ERROR);
         }
 
@@ -416,5 +416,5 @@
         $res = rename($tmp_csv_realfile, ZIP_CSV_REALFILE);
         if (!$res) {
-            SC_Utils_Ex::sfDispException('ファイル名を変更できません。: ' . $tmp_csv_realfile . ' -> ' . ZIP_CSV_REALFILE);
+            trigger_error('ファイル名を変更できません。: ' . $tmp_csv_realfile . ' -> ' . ZIP_CSV_REALFILE, E_USER_ERROR);
         }
     }
Index: branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php	(revision 21527)
+++ branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php	(revision 21582)
@@ -101,5 +101,5 @@
                 $this->arrErr = $objFormParam->checkError();
                 if (count($this->arrErr) > 0) {
-                    SC_Utils_Ex::sfDispException();
+                    trigger_error('', E_USER_ERROR);
                 }
 
Index: branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 21564)
+++ branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 21582)
@@ -603,5 +603,5 @@
             // いずれにも該当しない場合、例外エラー
             else {
-                SC_Utils_Ex::sfDispException();
+                trigger_error('', E_USER_ERROR);
             }
         }
Index: branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php	(revision 21540)
+++ branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php	(revision 21582)
@@ -439,5 +439,5 @@
             $msg .= '展開元: ' . $bkup_filepath . "\n";
             $msg .= '展開先: ' . $work_dir;
-            SC_Utils_Ex::sfDispException($msg);
+            trigger_error($msg, E_USER_ERROR);
         }
 
@@ -504,5 +504,5 @@
             $fp = fopen($file_path, 'r');
             if ($fp === false) {
-                SC_Utils_Ex::sfDispException($file_name . ' のファイルオープンに失敗しました。');
+                trigger_error($file_name . ' のファイルオープンに失敗しました。', E_USER_ERROR);
             }
 
Index: branches/version-2_12-dev/data/class/pages/admin/LC_Page_Admin.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/LC_Page_Admin.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/pages/admin/LC_Page_Admin.php	(revision 21582)
@@ -117,17 +117,17 @@
 
     /**
-     * ログ出力を行う.
+     * 前方互換用
      *
-     * ログイン中の管理者IDを含めてログ出力します.
-     *
-     * @access protected
-     * @param string $mess ログメッセージ
-     * @param string $log_level ログレベル('Info' or 'Debug')
-     * @return void
+     * @deprecated 2.12.0 GC_Utils_Ex::gfPrintLog を使用すること
      */
     function log($mess, $log_level) {
-        $mess = $mess . ' id=' . $_SESSION['login_id'] . '(' . $_SESSION['authority'] . ')' . '[' . session_id() . ']';
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        // ログレベル=Debugの場合は、DEBUG_MODEがtrueの場合のみログ出力する
+        if ($log_level === 'Debug' && DEBUG_MODE === false) {
+            return;
+        }
 
-        GC_Utils_Ex::gfAdminLog($mess, $log_level);
+        // ログ出力
+        GC_Utils_Ex::gfPrintLog($mess, '', true);
     }
 
Index: branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	(revision 21549)
+++ branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	(revision 21582)
@@ -768,5 +768,5 @@
         // 商品規格IDが指定されていない場合、例外エラーを発生
         if (strlen($product_class_id) === 0) {
-            SC_Utils_Ex::sfDispException('商品規格指定なし');
+            trigger_error('商品規格指定なし', E_USER_ERROR);
         }
 
@@ -793,5 +793,5 @@
             // 一致する商品規格がない場合、例外エラーを発生
             if (empty($arrProduct)) {
-                SC_Utils_Ex::sfDispException('商品規格一致なし');
+                trigger_error('商品規格一致なし', E_USER_ERROR);
             }
 
Index: branches/version-2_12-dev/data/class/pages/error/LC_Page_Error_SystemError.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/error/LC_Page_Error_SystemError.php	(revision 21514)
+++ branches/version-2_12-dev/data/class/pages/error/LC_Page_Error_SystemError.php	(revision 21582)
@@ -92,5 +92,5 @@
      */
     function sendResponse() {
-        $this->adminPage = SC_Utils_Ex::sfIsAdminFunction();
+        $this->adminPage = GC_Utils_Ex::isAdminFunction();
 
         if ($this->adminPage) {
@@ -136,38 +136,22 @@
         $errmsg .= "\n";
 
+        // デバッグ用のメッセージが指定されている場合
+        if (!empty($this->arrDebugMsg)) {
+            $errmsg .= implode("\n\n", $this->arrDebugMsg) . "\n";
+        }
+
         // PEAR エラーを伴う場合
         if (!is_null($this->pearResult)) {
             $errmsg .= $this->pearResult->message . "\n\n";
             $errmsg .= $this->pearResult->userinfo . "\n\n";
-            $errmsg .= SC_Utils_Ex::sfBacktraceToString($this->pearResult->backtrace);
+            $errmsg .= GC_Utils_Ex::toStringBacktrace($this->pearResult->backtrace);
         }
         // (上に該当せず)バックトレーススタックが指定されている場合
         else if (is_array($this->backtrace)) {
-            $errmsg .= SC_Utils_Ex::sfBacktraceToString($this->backtrace);
+            $errmsg .= GC_Utils_Ex::toStringBacktrace($this->backtrace);
         }
-        // (上に該当せず)バックトレースを生成できる環境(一般的には PHP 4 >= 4.3.0, PHP 5)の場合
-        else if (function_exists('debug_backtrace')) {
-            $backtrace = debug_backtrace();
-
-            // バックトレースのうち handle_error 以前は通常不要と考えられるので削除
-            $cnt = 0;
-            $offset = 0;
-            foreach ($backtrace as $key => $arrLine) {
-                $cnt ++;
-                if (!isset($arrLine['file']) && $arrLine['function'] === 'handle_error') {
-                    $offset = $cnt;
-                    break;
-                }
-            }
-            if ($offset !== 0) {
-                $backtrace = array_slice($backtrace, $offset);
-            }
-
-            $errmsg .= SC_Utils_Ex::sfBacktraceToString($backtrace);
-        }
-
-        // デバッグ用のメッセージが指定されている場合
-        if (!empty($this->arrDebugMsg)) {
-            $errmsg .= implode("\n\n", $this->arrDebugMsg) . "\n";
+        else {
+            $arrBacktrace = GC_Utils_Ex::getDebugBacktrace();
+            $errmsg .= GC_Utils_Ex::toStringBacktrace($arrBacktrace);
         }
 
Index: branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php	(revision 21514)
+++ branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php	(revision 21582)
@@ -68,6 +68,6 @@
 
         $this->setTemplate($this->tpl_mainpage);
-        $debug_message = 'block：' . $this->tpl_mainpage . "\n";
-        GC_Utils_Ex::gfDebugLog($debug_message);
+        // $debug_message = 'block：' . $this->tpl_mainpage . "\n";
+        // GC_Utils_Ex::gfDebugLog($debug_message);
     }
 }
Index: branches/version-2_12-dev/data/class/pages/LC_Page.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/LC_Page.php	(revision 21566)
+++ branches/version-2_12-dev/data/class/pages/LC_Page.php	(revision 21582)
@@ -379,17 +379,17 @@
 
     /**
-     * ログ出力を行う.
-     *
-     * ログイン中の会員IDを含めてログ出力します.
-     *
-     * @access protected
-     * @param string $mess ログメッセージ
-     * @param string $log_level ログレベル('Info' or 'Debug')
-     * @return void
+     * 前方互換用
+     *
+     * @deprecated 2.12.0 GC_Utils_Ex::gfPrintLog を使用すること
      */
     function log($mess, $log_level) {
-        $mess = $mess . ' user=' . $_SESSION['customer']['customer_id'];
-
-        GC_Utils_Ex::gfFrontLog($mess, $log_level);
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        // ログレベル=Debugの場合は、DEBUG_MODEがtrueの場合のみログ出力する
+        if ($log_level === 'Debug' && DEBUG_MODE === false) {
+            return;
+        }
+
+        // ログ出力
+        GC_Utils_Ex::gfPrintLog($mess, '', true);
     }
 
