mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
添加log方法用于记录日志信息
This commit is contained in:
12
base.php
12
base.php
@@ -186,7 +186,7 @@ function S($name,$value='',$options=null) {
|
||||
return $cache->rm($name);
|
||||
}else { // 缓存数据
|
||||
if(is_array($options)) {
|
||||
$expire = is_numeric($options['expire'])?$options['expire']:NULL; //修复查询缓存无法设置过期时间
|
||||
$expire = isset($options['expire'])?$options['expire']:NULL; //修复查询缓存无法设置过期时间
|
||||
}else{
|
||||
$expire = is_numeric($options)?$options:NULL; //默认快捷缓存设置过期时间
|
||||
}
|
||||
@@ -194,6 +194,16 @@ function S($name,$value='',$options=null) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志记录
|
||||
* @param string $log 日志信息
|
||||
* @param string $type 日志类型
|
||||
* @return void
|
||||
*/
|
||||
function log($log,$type='DEBUG') {
|
||||
Think\Log::record($log,$type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字符串命名风格转换
|
||||
* type 0 将Java风格转换为C的风格 1 将C风格转换为Java的风格
|
||||
|
||||
Reference in New Issue
Block a user