Ignore:
Timestamp:
2011/09/29 10:54:23 (13 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20110928071457-fjo42gyahu97a15l
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/class/SC_Initial.php 16506@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Initial.php
html/handle_error.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fhtml%2Fhandle_error.php
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110929015322-rzlwmthbylnvgrph
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110929015419-4lkfsoribp6t9hqb
bzr:revno:
3962
bzr:revprop:branch-nick:
branches/version-2_11-dev
bzr:root:
branches/version-2_11-dev
bzr:testament:

bazaar-ng testament short form 2.1
revision-id: ohkouchi@loop-az.jp-20110929015419-4lkfsoribp6t9hqb
sha1: 5bb9f762219d41ad099b6e654614a24a56cfe8cb
bzr:text-parents:

data/class/SC_Initial.php ohkouchi@loop-az.jp-20110926075834-4rzol2buff3qnz9v
html/handle_error.php ohkouchi@loop-az.jp-20110322062543-rbk61hf6u1fkv2ja
bzr:timestamp:
2011-09-29 10:54:19.621999979 +0900
bzr:user-agent:
bzr2.4.1+bzr-svn1.1.0
Message:

#1492 (エラーログにタイムスタンプが記録されない)

Location:
branches/version-2_11-dev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/SC_Initial.php

    r21258 r21264  
    122122    function phpconfigInit() { 
    123123        ini_set('display_errors', '1'); 
     124        ini_set('html_errors', '1'); 
    124125        ini_set('mbstring.http_input', CHAR_CODE); 
    125126        ini_set('mbstring.http_output', CHAR_CODE); 
  • branches/version-2_11-dev/html/handle_error.php

    r20764 r21264  
    4242function &_fatal_error_handler(&$buffer) { 
    4343    if (preg_match('/<b>(Fatal) error<\/b>: +(.+) in <b>(.+)<\/b> on line <b>(\d+)<\/b><br \/>/i', $buffer, $matches)) { 
    44         error_log("FATAL Error: $matches[3]:$matches[4] $matches[2]\n", 3, 
     44        $now = date("Y/m/d H:i:s"); 
     45        error_log($now . " [$matches[3]:$matches[4]] FATAL Error: $matches[2] from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, 
    4546                  realpath(dirname(__FILE__) . "/" . HTML2DATA_DIR . "logs/site.log")); 
    4647        if (DEBUG_MODE !== true) { 
     
    7374 */ 
    7475function handle_error($errno, $errstr, $errfile, $errline) { 
     76    $now = date("Y/m/d H:i:s"); 
    7577    switch ($errno) { 
    7678    case E_USER_ERROR: 
    77         error_log("FATAL Error($errno) $errfile:$errline $errstr", 3, realpath(dirname(__FILE__) . "/" . HTML2DATA_DIR . "logs/site.log")); 
     79        error_log($now . " [$errfile] FATAL Error($errno) $errfile:$errline $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, realpath(dirname(__FILE__) . "/" . HTML2DATA_DIR . "logs/site.log")); 
    7880 
    7981        displaySystemError($errstr); 
Note: See TracChangeset for help on using the changeset viewer.