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
05884bcd
Commit
05884bcd
authored
8 years ago
by
Joas Schilling
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3178 from nextcloud/default-value-logdateformat
fix default value for logdateformat
parents
b5990b74
a13ea677
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config.sample.php
+3
-1
3 additions, 1 deletion
config/config.sample.php
lib/private/Console/TimestampFormatter.php
+1
-1
1 addition, 1 deletion
lib/private/Console/TimestampFormatter.php
lib/private/Log/File.php
+2
-2
2 additions, 2 deletions
lib/private/Log/File.php
with
6 additions
and
4 deletions
config/config.sample.php
+
3
−
1
View file @
05884bcd
...
@@ -716,7 +716,9 @@ $CONFIG = array(
...
@@ -716,7 +716,9 @@ $CONFIG = array(
/**
/**
* This uses PHP.date formatting; see http://php.net/manual/en/function.date.php
* This uses PHP.date formatting; see http://php.net/manual/en/function.date.php
*
*
* Defaults to ``Y-m-d\TH:i:sO`` (ISO8601)
* Defaults to ``Y-m-d\TH:i:sP`` (ISO8601 but with colon between hours and
* minutes of the timezone) - see \DateTime::ISO8601
* (https://secure.php.net/manual/en/class.datetime.php#datetime.constants.iso8601)
*/
*/
'logdateformat'
=>
'F d, Y H:i:s'
,
'logdateformat'
=>
'F d, Y H:i:s'
,
...
...
This diff is collapsed.
Click to expand it.
lib/private/Console/TimestampFormatter.php
+
1
−
1
View file @
05884bcd
...
@@ -101,7 +101,7 @@ class TimestampFormatter implements OutputFormatterInterface {
...
@@ -101,7 +101,7 @@ class TimestampFormatter implements OutputFormatterInterface {
$timeZone
=
$timeZone
!==
null
?
new
\DateTimeZone
(
$timeZone
)
:
null
;
$timeZone
=
$timeZone
!==
null
?
new
\DateTimeZone
(
$timeZone
)
:
null
;
$time
=
new
\DateTime
(
'now'
,
$timeZone
);
$time
=
new
\DateTime
(
'now'
,
$timeZone
);
$timestampInfo
=
$time
->
format
(
$this
->
config
->
getSystemValue
(
'logdateformat'
,
'c'
));
$timestampInfo
=
$time
->
format
(
$this
->
config
->
getSystemValue
(
'logdateformat'
,
\DateTime
::
ISO8601
));
return
$timestampInfo
.
' '
.
$this
->
formatter
->
format
(
$message
);
return
$timestampInfo
.
' '
.
$this
->
formatter
->
format
(
$message
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/private/Log/File.php
+
2
−
2
View file @
05884bcd
...
@@ -75,8 +75,8 @@ class File {
...
@@ -75,8 +75,8 @@ class File {
$config
=
\OC
::
$server
->
getSystemConfig
();
$config
=
\OC
::
$server
->
getSystemConfig
();
// default to ISO8601
// default to ISO8601
$format
=
$config
->
getValue
(
'logdateformat'
,
'c'
);
$format
=
$config
->
getValue
(
'logdateformat'
,
\DateTime
::
ISO8601
);
$logTimeZone
=
$config
->
getValue
(
"
logtimezone
"
,
'UTC'
);
$logTimeZone
=
$config
->
getValue
(
'
logtimezone
'
,
'UTC'
);
try
{
try
{
$timezone
=
new
\DateTimeZone
(
$logTimeZone
);
$timezone
=
new
\DateTimeZone
(
$logTimeZone
);
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
...
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