Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
7ac0e2da
Commit
7ac0e2da
authored
Mar 15, 2021
by
Michael Iseard
Browse files
Various logging improvements
parent
4fedd56a
Changes
4
Show whitespace changes
Inline
Side-by-side
app/Admin/partials/kudos-admin-debug.php
View file @
7ac0e2da
...
...
@@ -80,8 +80,7 @@ $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $default_tab;
$class
=
'notice-error'
;
break
;
case
'DEBUG'
:
$class
=
''
;
$style
=
''
;
$class
=
'notice-debug'
;
break
;
default
:
$class
=
'notice-'
.
strtolower
(
$level
);
...
...
app/Service/ActivatorService.php
View file @
7ac0e2da
...
...
@@ -49,7 +49,7 @@ class ActivatorService {
self
::
create_subscriptions_table
();
update_option
(
'_kudos_donations_version'
,
KUDOS_VERSION
);
$logger
->
info
(
'Kudos Donations plugin activated'
);
$logger
->
info
(
'Kudos Donations plugin activated'
,
[
'version'
=>
KUDOS_VERSION
]
);
}
...
...
app/Service/LoggerService.php
View file @
7ac0e2da
...
...
@@ -114,7 +114,7 @@ class LoggerService extends Monolog {
public
function
init
()
{
if
(
wp_mkdir_p
(
self
::
LOG_DIR
)
)
{
$this
->
info
(
'Log directory created successfully'
);
$this
->
info
(
'Log directory created successfully'
,
[
self
::
LOG_DIR
]
);
return
;
}
...
...
app/Service/TwigService.php
View file @
7ac0e2da
...
...
@@ -162,7 +162,7 @@ class TwigService extends AbstractService {
$logger
=
$this
->
logger
;
if
(
wp_mkdir_p
(
self
::
CACHE_DIR
)
)
{
$logger
->
info
(
'Twig cache directory created successfully'
);
$logger
->
info
(
'Twig cache directory created successfully'
,
[
self
::
CACHE_DIR
]
);
$this
->
clearCache
();
return
;
...
...
@@ -211,7 +211,7 @@ class TwigService extends AbstractService {
try
{
return
$this
->
twig
->
render
(
$template
,
$array
);
}
catch
(
Throwable
$e
)
{
$this
->
logger
->
critical
(
$e
->
getMessage
(),
[
$template
,
$e
->
getLine
()
]
);
$this
->
logger
->
critical
(
$e
->
getMessage
(),
[
'template'
=>
$template
,
'line'
=>
$e
->
getLine
()
]
);
return
false
;
}
...
...
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