Skip to content

Commit

Permalink
正式版发布
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangbj committed May 13, 2019
1 parent 0af0161 commit fa01eed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dome/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use \logger\Logger;

#设置logs根目录
define('LOG_PATH', realpath(__DIR__).DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR); // 日志目录
define('LOG_PATH', realpath(__DIR__).DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR); // 日志目录 默认位置是项目根目录
Logger::i('测试字符串内容', '中文路径名/测试文件', '0');
Logger::i(array('数组内容'), 'array/res', '1');
Logger::i(array('数组内容'), 'array/res', '2');
2 changes: 1 addition & 1 deletion src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function __construct($log_file)
throw new Exception('文件名不可以是空值,并且不能包含特殊字符,如有特殊字符会被替换为下划线', '001');
}
$log_file = $this->replace_special_char($log_file);
defined('LOG_PATH') or define('LOG_PATH', realpath(__DIR__).DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR); // 日志目录
defined('LOG_PATH') or define('LOG_PATH', realpath(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR); // 日志目录
$this->log_name = LOG_PATH.$log_file.date('_Y_m_d').'.log';
}

Expand Down

0 comments on commit fa01eed

Please sign in to comment.