Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-rpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-rpc
Commits
40d2ffb3
Commit
40d2ffb3
authored
Jun 02, 2020
by
fuyunnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文件名称和实例化内容
parent
a33b9e4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
functions.php
src/functions.php
+4
-4
No files found.
src/functions.php
View file @
40d2ffb3
...
...
@@ -429,15 +429,15 @@ if (!function_exists('putLog')) {
* @throws
* @return void
*/
function
put
L
og
(
$output
=
'out-mes'
,
$filename
=
''
,
$dir
=
BASE_PATH
.
'/runtime/dev/'
)
function
put
_l
og
(
$output
=
'out-mes'
,
$filename
=
''
,
$dir
=
BASE_PATH
.
'/runtime/dev/'
)
{
!
is_dir
(
$dir
)
&&
!
mkdir
(
$dir
,
0777
,
true
);
// 创建一个 Channel,参数 log 即为 Channel 的名字
$log
=
new
Logger
(
''
);
$log
=
make
(
Logger
::
class
,
[
''
]
);
// 创建两个 Handler,对应变量 $stream 和 $fire
!
$filename
&&
$filename
=
date
(
'Y-m-d'
,
time
())
.
'.log'
;
$stream
=
new
StreamHandler
(
$dir
.
$filename
,
Logger
::
WARNING
);
$fire
=
new
FirePHPHandler
(
);
$stream
=
make
(
StreamHandler
::
class
,[
$dir
.
$filename
,
Logger
::
WARNING
]
);
$fire
=
make
(
FirePHPHandler
::
class
);
if
(
is_array
(
$output
))
{
$output
=
var_export
(
$output
,
true
);
}
...
...
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