Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-logs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-logs
Commits
8b7a09c0
Commit
8b7a09c0
authored
1 year ago
by
Grzegorz Rola
Browse files
Options
Downloads
Patches
Plain Diff
feature(monolog): updated
parent
5a67dfda
No related branches found
No related tags found
1 merge request
!26
feature(monolog): updated
Pipeline
#221645
passed with warnings with stages
in 39 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/WC/WooCommerceHandler.php
+2
-2
2 additions, 2 deletions
src/WC/WooCommerceHandler.php
src/WC/WooCommerceMonologPlugin.php
+12
-12
12 additions, 12 deletions
src/WC/WooCommerceMonologPlugin.php
with
14 additions
and
14 deletions
src/WC/WooCommerceHandler.php
+
2
−
2
View file @
8b7a09c0
...
@@ -23,7 +23,7 @@ class WooCommerceHandler extends AbstractProcessingHandler {
...
@@ -23,7 +23,7 @@ class WooCommerceHandler extends AbstractProcessingHandler {
* @param array $record
* @param array $record
* @return void
* @return void
*/
*/
protected
function
write
(
array
$record
)
{
protected
function
write
(
array
$record
)
:
void
{
$context
=
array_merge
(
$context
=
array_merge
(
[
[
'source'
=>
$this
->
channel
,
'source'
=>
$this
->
channel
,
...
@@ -39,7 +39,7 @@ class WooCommerceHandler extends AbstractProcessingHandler {
...
@@ -39,7 +39,7 @@ class WooCommerceHandler extends AbstractProcessingHandler {
* @param int $level
* @param int $level
* @return string
* @return string
*/
*/
private
function
convertMonologLevelToWC
(
$level
)
{
private
function
convertMonologLevelToWC
(
$level
)
:
string
{
return
Logger
::
getLevelName
(
$level
);
return
Logger
::
getLevelName
(
$level
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/WC/WooCommerceMonologPlugin.php
+
12
−
12
View file @
8b7a09c0
...
@@ -32,7 +32,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -32,7 +32,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @param string $source
* @param string $source
*/
*/
public
function
clear
(
$source
=
''
)
public
function
clear
(
$source
=
''
)
:
void
{
{
$this
->
originalWCLogger
->
clear
(
$source
);
$this
->
originalWCLogger
->
clear
(
$source
);
}
}
...
@@ -40,7 +40,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -40,7 +40,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
/**
/**
* Method added for compatibility with \WC_Logger
* Method added for compatibility with \WC_Logger
*/
*/
public
function
clear_expired_logs
()
public
function
clear_expired_logs
()
:
void
{
{
$this
->
originalWCLogger
->
clear_expired_logs
();
$this
->
originalWCLogger
->
clear_expired_logs
();
}
}
...
@@ -55,7 +55,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -55,7 +55,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @deprecated
* @deprecated
*/
*/
public
function
add
(
$handle
,
$message
,
$level
=
WC_Log_Levels
::
NOTICE
)
public
function
add
(
$handle
,
$message
,
$level
=
WC_Log_Levels
::
NOTICE
)
:
void
{
{
$this
->
log
(
$message
,
$level
);
$this
->
log
(
$message
,
$level
);
}
}
...
@@ -68,12 +68,12 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -68,12 +68,12 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
emergency
(
$message
,
$context
=
array
())
public
function
emergency
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
EMERGENCY
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
EMERGENCY
,
$message
,
$context
);
}
}
public
function
log
(
$level
,
$message
,
$context
=
[])
public
function
log
(
$level
,
$message
,
$context
=
[])
:
void
{
{
$this
->
monolog
->
log
(
$level
,
$message
,
$context
);
$this
->
monolog
->
log
(
$level
,
$message
,
$context
);
}
}
...
@@ -89,7 +89,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -89,7 +89,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
alert
(
$message
,
$context
=
array
())
public
function
alert
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
ALERT
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
ALERT
,
$message
,
$context
);
}
}
...
@@ -104,7 +104,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -104,7 +104,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
critical
(
$message
,
$context
=
array
())
public
function
critical
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
CRITICAL
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
CRITICAL
,
$message
,
$context
);
}
}
...
@@ -118,7 +118,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -118,7 +118,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
error
(
$message
,
$context
=
array
())
public
function
error
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
ERROR
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
ERROR
,
$message
,
$context
);
}
}
...
@@ -134,7 +134,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -134,7 +134,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
warning
(
$message
,
$context
=
array
())
public
function
warning
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
WARNING
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
WARNING
,
$message
,
$context
);
}
}
...
@@ -147,7 +147,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -147,7 +147,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
notice
(
$message
,
$context
=
array
())
public
function
notice
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
NOTICE
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
NOTICE
,
$message
,
$context
);
}
}
...
@@ -162,7 +162,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -162,7 +162,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
info
(
$message
,
$context
=
array
())
public
function
info
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
INFO
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
INFO
,
$message
,
$context
);
}
}
...
@@ -175,7 +175,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
...
@@ -175,7 +175,7 @@ class WooCommerceMonologPlugin implements \WC_Logger_Interface
*
*
* @return void
* @return void
*/
*/
public
function
debug
(
$message
,
$context
=
array
())
public
function
debug
(
$message
,
$context
=
array
())
:
void
{
{
$this
->
log
(
LogLevel
::
DEBUG
,
$message
,
$context
);
$this
->
log
(
LogLevel
::
DEBUG
,
$message
,
$context
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment