Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
2ad33bc0
Commit
2ad33bc0
authored
5 years ago
by
Tim Terhorst
Browse files
Options
Downloads
Patches
Plain Diff
Add Fatal logging option
Signed-off-by:
Tim Terhorst
<
mynamewastaken+gitlab@gmail.com
>
parent
3e285654
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/Command/Log/Manage.php
+6
-2
6 additions, 2 deletions
core/Command/Log/Manage.php
tests/Core/Command/Log/ManageTest.php
+2
-0
2 additions, 0 deletions
tests/Core/Command/Log/ManageTest.php
with
8 additions
and
2 deletions
core/Command/Log/Manage.php
+
6
−
2
View file @
2ad33bc0
...
@@ -62,7 +62,7 @@ class Manage extends Command implements CompletionAwareInterface {
...
@@ -62,7 +62,7 @@ class Manage extends Command implements CompletionAwareInterface {
'level'
,
'level'
,
null
,
null
,
InputOption
::
VALUE_REQUIRED
,
InputOption
::
VALUE_REQUIRED
,
'set the log level [debug, info, warning, error]'
'set the log level [debug, info, warning, error
, fatal
]'
)
)
->
addOption
(
->
addOption
(
'timezone'
,
'timezone'
,
...
@@ -152,6 +152,8 @@ class Manage extends Command implements CompletionAwareInterface {
...
@@ -152,6 +152,8 @@ class Manage extends Command implements CompletionAwareInterface {
case
'error'
:
case
'error'
:
case
'err'
:
case
'err'
:
return
3
;
return
3
;
case
'fatal'
:
return
4
;
}
}
throw
new
\InvalidArgumentException
(
'Invalid log level string'
);
throw
new
\InvalidArgumentException
(
'Invalid log level string'
);
}
}
...
@@ -171,6 +173,8 @@ class Manage extends Command implements CompletionAwareInterface {
...
@@ -171,6 +173,8 @@ class Manage extends Command implements CompletionAwareInterface {
return
'Warning'
;
return
'Warning'
;
case
3
:
case
3
:
return
'Error'
;
return
'Error'
;
case
4
:
return
'Fatal'
;
}
}
throw
new
\InvalidArgumentException
(
'Invalid log level number'
);
throw
new
\InvalidArgumentException
(
'Invalid log level number'
);
}
}
...
@@ -184,7 +188,7 @@ class Manage extends Command implements CompletionAwareInterface {
...
@@ -184,7 +188,7 @@ class Manage extends Command implements CompletionAwareInterface {
if
(
$optionName
===
'backend'
)
{
if
(
$optionName
===
'backend'
)
{
return
[
'file'
,
'syslog'
,
'errorlog'
,
'systemd'
];
return
[
'file'
,
'syslog'
,
'errorlog'
,
'systemd'
];
}
else
if
(
$optionName
===
'level'
)
{
}
else
if
(
$optionName
===
'level'
)
{
return
[
'debug'
,
'info'
,
'warning'
,
'error'
];
return
[
'debug'
,
'info'
,
'warning'
,
'error'
,
'fatal'
];
}
else
if
(
$optionName
===
'timezone'
)
{
}
else
if
(
$optionName
===
'timezone'
)
{
return
\DateTimeZone
::
listIdentifiers
();
return
\DateTimeZone
::
listIdentifiers
();
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/Core/Command/Log/ManageTest.php
+
2
−
0
View file @
2ad33bc0
...
@@ -110,6 +110,7 @@ class ManageTest extends TestCase {
...
@@ -110,6 +110,7 @@ class ManageTest extends TestCase {
[
'wArn'
,
2
],
[
'wArn'
,
2
],
[
'error'
,
3
],
[
'error'
,
3
],
[
'eRr'
,
3
],
[
'eRr'
,
3
],
[
'fAtAl'
,
4
],
];
];
}
}
...
@@ -135,6 +136,7 @@ class ManageTest extends TestCase {
...
@@ -135,6 +136,7 @@ class ManageTest extends TestCase {
[
1
,
'Info'
],
[
1
,
'Info'
],
[
2
,
'Warning'
],
[
2
,
'Warning'
],
[
3
,
'Error'
],
[
3
,
'Error'
],
[
4
,
'Fatal'
],
];
];
}
}
...
...
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