Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
irul
/
php-logger
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d2114b77
authored
Aug 31, 2024
by
irul
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update example
1 parent
58ea95a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
example.php
example.php
View file @
d2114b7
...
...
@@ -8,8 +8,24 @@ require_once 'Logger.php';
/* Define log path and log filename */
$logger
=
Logger
::
get_logger
(
'./logs'
,
'my-log'
);
$logger
->
log
(
"normal log message"
);
$logger
->
log
(
"log with addtional arguments: %s, %s"
,
"msg1"
,
"msg2"
);
$logger
->
log
(
"
normal
log with addtional arguments: %s, %s"
,
"msg1"
,
"msg2"
);
/* Dump */
$data
=
array
(
1
,
2
,
3
);
$logger
->
dump
(
$data
,
"data"
);
// or just: $logger->dump($data);
/* Log Debug */
$logger
->
debug
(
"log debug"
);
$logger
->
debug
(
"log debug with addtional arguments: %s, %s"
,
"msg1"
,
"msg2"
);
/* Log Info */
$logger
->
info
(
"log info"
);
$logger
->
info
(
"log info with addtional arguments: %s, %s"
,
"msg1"
,
"msg2"
);
/* Log Warning */
$logger
->
warning
(
"log warning"
);
$logger
->
warning
(
"log warning with addtional arguments: %s, %s"
,
"msg1"
,
"msg2"
);
/* Log Error */
$logger
->
error
(
"log error"
);
$logger
->
error
(
"log error with addtional arguments: %s, %s"
,
"msg1"
,
"msg2"
);
Write
Preview
Markdown
is supported
Attach a file
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 post a comment