Commit Graph

34 Commits

Author SHA1 Message Date
Lukas Reschke 1fffc30cf0 Only use the user session if ownCloud is already installed
When installing ownCloud with autotest and MySQL some log entries may be created which will invoke the logging class. IUserSession has a dependency on the database which will make the installation fail => 💣
2016-03-22 17:34:20 +01:00
Lukas Reschke 7adae4476f Log more information by default
This modifies the logger to add the following logging information by default:

- Request Method
- Request URL
- Current user
2016-03-21 15:48:01 +01:00
Phiber2000 3e7b2810e2 fix broken logtimezone 2016-03-14 15:10:47 +01:00
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Lukas Reschke 8a4e1fbecd Fix errors after install
When installing ownCloud the first time the first thing that an admin saw was an error message:

> Error   PHP   touch(): Unable to create file owncloud.log because Permission denied at /var/www/owncloud/lib/private/log/owncloud.php#48

Or something related. This lead to a lot confusion as can be seen in our forum and in our issue tracker. This change should make the error messages disappear in most cases (e.g. where the file can actually be written). To test this:

1. On master install ownCloud and check owncloud.log => Error message
2. On this branch install ownCloud and check owncloud.log => No error message

Fixes https://github.com/owncloud/core/issues/13736 and https://github.com/owncloud/core/issues/12893
2016-01-26 17:06:23 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Christian Schnidrig 7fce06b3f3 When microtime(true) returns a whole number, then the parsing fails.
This patch makes sure, that the value can always be parsed correctly.
2015-12-22 15:06:32 +01:00
Thomas Müller a7ecb6e984 Let's print error messages to the builtin webserver console ... makes development a bit easier 2015-12-14 12:16:41 +01:00
Morris Jobke c60c793cf2 More cleanups of OC_Config usage 2015-12-03 16:41:23 +01:00
Thomas Müller 6ffd042a64 fixes #20538 2015-11-16 16:29:21 +01:00
Christian Schnidrig d0464bf772 enable microseconds in log timestamps 2015-11-12 10:33:20 +01:00
Thomas Müller d3ac73c0c9 Remove OC_Log 2015-07-03 18:00:16 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Morris Jobke 892b5ceeeb Move log level check to logger parent class
* remove duplicate code from child classes
2015-05-08 15:14:45 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Lukas Reschke 886bda5f81 Refactor OC_Request into TrustedDomainHelper and IRequest
This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.

This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.

Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.

Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
2015-02-16 22:13:00 +01:00
Lukas Reschke 770fa761b8 Respect `mod_unique_id` and refactor `OC_Request::getRequestId`
When `mod_unique_id` is enabled the ID generated by it will be used for logging. This allows for correlation of the Apache logs and the ownCloud logs.

Testplan:

- [ ] When `mod_unique_id` is enabled the request ID equals the one generated by `mod_unique_id`.
- [ ] When `mod_unique_id` is not available the request ID is a 20 character long random string
- [ ] The generated Id is stable over the lifespan of one request

Changeset looks a little bit larger since I had to adjust every unit test using the HTTP\Request class for proper DI.

Fixes https://github.com/owncloud/core/issues/13366
2015-02-09 11:53:11 +01:00
Georg Ehrke f579f2bd94 add Download logfile button to admin settings
add logSettingsController

add download logfile button

move getEntries to LogSettingsController

move set log level to logsettingscontroller.php

add warning if logfile is bigger than 100MB

add unit test for set log level

fix typecasting, add new line at EoF

show log and logfile download only if log_type is set to owncloud

add unit test for getFilenameForDownload
2015-01-07 14:55:53 +01:00
Lukas Reschke 6d3757f864 Do not show exception to the end-user
Log the error instead of potentially leaking sensitive information
2014-09-17 13:17:52 +02:00
ringmaster c9c6a0ab1e Don't error out on console. 2014-06-04 07:55:45 +02:00
Lukas Reschke 826b14e36b Fix typo 2014-06-04 07:55:45 +02:00
ringmaster 428510a4f8 Simpler log unique id. 2014-06-04 07:55:44 +02:00
ringmaster f9dbdb7c5c Add actual locking and log changes necessary for debugging. 2014-06-04 07:55:44 +02:00
Bjoern Schiessle 44b637470c remove passwords in URLs from all log messages 2014-02-03 12:07:56 +01:00
Bjoern Schiessle 62afe7fe7a remove passwords from logfile 2013-11-26 12:26:32 +01:00
Andreas Fischer 5978ddbec6 Try to create custom log file before falling back to default. 2013-10-20 23:58:07 +02:00
Frank Karlitschek 9e99f9d13d the logfile shoudn't be world readable. 2013-10-18 17:15:02 +02:00
Tom Needham cf7ea4bec5 Handle ownCloud logging when data dir not created 2013-10-11 17:16:37 +01:00
Bjoern Schiessle c1e5725db9 changed default time format to ISO8601 2013-10-09 10:40:20 +02:00
Bjoern Schiessle 3cf4c46c43 catch unknown timezone and fall-back to UTC 2013-10-08 20:42:35 +02:00
Bjoern Schiessle 6a411833b9 let admin specify timezone for log file entries 2013-10-07 15:34:48 +02:00
Thomas Müller 9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00