Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
b26af4ed
Commit
b26af4ed
authored
Jun 04, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改记录日志的格式
parent
fc22d41b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
Application.php
classes/fpf/yii_component/Application.php
+12
-21
No files found.
classes/fpf/yii_component/Application.php
View file @
b26af4ed
...
@@ -29,31 +29,22 @@ class Application extends Component
...
@@ -29,31 +29,22 @@ class Application extends Component
echo
$this
->
terry
.
"Hello Welcome to MyComponent"
;
echo
$this
->
terry
.
"Hello Welcome to MyComponent"
;
}
}
p
rivate
function
checkAndFilterLog
(
$arr_code_arr
)
p
ublic
function
info
(
$cate
,
$code
,
$class
,
$func
,
$user_data
)
{
{
if
((
empty
(
$arr_code_arr
[
'code'
])
&&
empty
(
$arr_code_arr
[
'arr'
]))
\Yii
::
info
(
$code
.
"
\t
"
.
json_encode
([
||
(
!
empty
(
$arr_code_arr
[
'code'
])
&&
!
is_numeric
(
$arr_code_arr
[
'code'
]))
'class'
=>
$class
,
||
(
!
empty
(
$arr_code_arr
[
'arr'
])
&&
!
is_array
(
$arr_code_arr
[
'arr'
])))
{
'function'
=>
$func
,
exit
(
'check param one,code json'
);
'user_data'
=>
$user_data
}
]),
$cate_name
);
if
(
empty
(
$arr_code_arr
[
'code'
]))
{
$arr_code_arr
[
'code'
]
=
0
;
}
if
(
empty
(
$arr_code_arr
[
'arr'
]))
{
$arr_code_arr
[
'arr'
]
=
""
;
}
return
$arr_code_arr
;
}
public
function
info
(
$arr_code_arr
,
$cate_name
)
{
$arr_code_arr
=
$this
->
checkAndFilterLog
(
$arr_code_arr
);
\Yii
::
info
(
$arr_code_arr
[
'code'
]
.
"
\t
"
.
json_encode
(
$arr_code_arr
[
'arr'
]),
$cate_name
);
}
}
public
function
error
(
$
arr_code_arr
,
$cate_name
)
public
function
error
(
$
cate
,
$code
,
$class
,
$func
,
$user_data
)
{
{
$arr_code_arr
=
$this
->
checkAndFilterLog
(
$arr_code_arr
);
\Yii
::
error
(
$code
.
"
\t
"
.
json_encode
([
\Yii
::
error
(
$arr_code_arr
[
'code'
]
.
"
\t
"
.
json_encode
(
$arr_code_arr
[
'arr'
]),
$cate_name
);
'class'
=>
$class
,
'function'
=>
$func
,
'user_data'
=>
$user_data
]),
$cate_name
);
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment