Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
264
Merge Requests
27
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
788646f5
Commit
788646f5
authored
10 minutes ago
by
Emiliano Balbuena
Browse files
Options
Download
(fix): Sentry Monolog handler should have minLevel set
parent
fa210f05
epic/feature-flags
1 merge request
!435
Feature flags from GitLab
Pipeline
#112677665
passed with stages
in 8 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Core/Log/Logger.php
View file @
788646f5
...
...
@@ -39,6 +39,7 @@ class Logger extends MonologLogger
'minLogLevel'
=>
null
,
],
$options
);
$isProduction
=
(
bool
)
$options
[
'isProduction'
];
$level
=
$options
[
'minLogLevel'
]
??
MonologLogger
::
INFO
;
$handlers
=
[];
...
...
@@ -54,14 +55,14 @@ class Logger extends MonologLogger
->
setFormatter
(
new
LineFormatter
(
"%channel%.%level_name%: %message% %context% %extra%
\n
"
,
'c'
,
!
$
options
[
'isProduction'
]
,
// Allow newlines on dev mode
!
$
isProduction
,
// Allow newlines on dev mode
true
));
$handlers
[]
=
$errorLogHandler
;
if
(
$
options
[
'isProduction'
]
)
{
$handlers
[]
=
new
SentryHandler
(
SentrySdk
::
getCurrentHub
());
if
(
$
isProduction
)
{
$handlers
[]
=
new
SentryHandler
(
SentrySdk
::
getCurrentHub
()
,
$level
);
}
else
{
// Extra handlers for Development Mode
...
...
This diff is collapsed.
Please
register
or
sign in
to comment