New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loglevel value in config.php ignored #26131

Closed
plabong opened this Issue Sep 18, 2016 · 10 comments

Comments

Projects
None yet
6 participants
@plabong

plabong commented Sep 18, 2016

Steps to reproduce

  1. config.php: 'loglevel' => 4
  2. Webserver restarted (should not be required, but ...)

Expected behaviour

owncloud.log: no more log lines marked as "level":3

Actual behaviour

still a lot of log entries marked as "level":3

Server configuration

Operating system:
Debian GNU/Linux testing (stretch)

Web server:
Apache/2.4.23 (Debian)

Database:
10.0.27-MariaDB-0+deb8u1 (Debian)

PHP version:
7.0.10

ownCloud version:
9.1.0.15

Updated from an older ownCloud or fresh install:
updated from 9.0.5

Where did you install ownCloud from:
tarball

Signing status (ownCloud 9.0 and above):
No errors have been found.

List of activated apps:
Enabled:

  • activity: 2.3.2
  • calendar: 1.3.3
  • comments: 0.3.0
  • dav: 0.2.5
  • federatedfilesharing: 0.3.0
  • files: 1.5.1
  • files_external: 0.6.0
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.10.0
  • files_texteditor: 2.1
  • files_trashbin: 0.9.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • gallery: 15.0.0
  • notifications: 0.3.0
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1
    Disabled:
  • encryption
  • external
  • federation
  • files_antivirus
  • firstrunwizard
  • user_external
  • user_ldap

The content of config/config.php:
{
"system": {
"datadirectory": "/data/data-oc",
"dbhost": "localhost",
"dbname": "owncloud",
"dbpassword": "_REMOVED SENSITIVE VALUE",
"dbtableprefix": "oc
",
"dbtype": "mysql",
"dbuser": "_REMOVED SENSITIVE VALUE",
"default_language": "de",
"forcessl": true,
"installed": true,
"installedat": "1337003776.401",
"instanceid": "508063daf00ef",
"lastupdatedat": "1337004166.2597",
"logdateformat": "Y-m-d H:i:s",
"loglevel": 4,
"logtimezone": "Europe/Berlin",
"maintenance": false,
"filelocking.enabled": true,
"memcache.locking": "\OC\Memcache\Redis",
"memcache.local": "\OC\Memcache\Redis",
"redis": {
"host": "localhost",
"port": 6379,
"timeout": 0
},
"overwrite.cli.url": "https://www.rehavista.net/owncloud",
"passwordsalt": "_REMOVED SENSITIVE VALUE
",
"secret": "_REMOVED SENSITIVE VALUE_",
"share_folder": "/Shared",
"theme": "rehavista",
"trusted_domains": [
"www.rehavista.net"
],
"updatechecker": true,
"version": "9.1.0.15",
"appstore.experimental.enabled": true,
"trashbin_retention_obligation": "14,21",
"versions_retention_obligation": "28,56",
"activity_expire_days": 100,
"mail_from_address": "owncloud",
"mail_smtpmode": "smtp",
"mail_domain": "rehavista.net",
"mail_smtphost": "192.168.100.2",
"mail_smtpport": "25"
}
}

Are you using external storage, if yes which one:
yes: local

Are you using encryption:
no

Are you using an external user-backend, if yes which one:
no

Client configuration

Firefox 48.0.2

Operating system:
Windows 10 / 1607

Logs

Web server error log

no errors in web server log

ownCloud log (data/owncloud.log)

(just on representative line)
{"reqId":"5fJ8GgXbvMWg1qR+ynLS"
,"remoteAddr":"93.104.57.113"
,"app":"no app in context"
,"message":"Error getting storage info for mount at hidden"
,"level":3
,"time":"2016-09-18 11:44:20"
,"method":"PROPFIND"
,"url":"/owncloud/remote.php/webdav/"
,"user":"hidden"
}

Browser log

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Sep 19, 2016

Member

Works for me.

Maybe a caching issue ?

Member

PVince81 commented Sep 19, 2016

Works for me.

Maybe a caching issue ?

@plabong

This comment has been minimized.

Show comment
Hide comment
@plabong

plabong Sep 21, 2016

The last change of loglevel in config.sys ...

  'lastupdatedat' => '1337004166.2597',
  'logdateformat' => 'Y-m-d H:i:s',
  'loglevel' => 4,
  'logtimezone' => 'Europe/Berlin',
  'maintenance' => false,

... was some days ago ...

-rw-r----- 1 www-data www-data 1451 2016-09-19 22:45 config/config.php

... but I still see a lot of "level":3 entries in owncloud .log ...

{... "File with id \"115579\" has not been found.","level":3,"time":"2016-09-21 14:09:18" ...}

Is there a way to clean the caching system?

plabong commented Sep 21, 2016

The last change of loglevel in config.sys ...

  'lastupdatedat' => '1337004166.2597',
  'logdateformat' => 'Y-m-d H:i:s',
  'loglevel' => 4,
  'logtimezone' => 'Europe/Berlin',
  'maintenance' => false,

... was some days ago ...

-rw-r----- 1 www-data www-data 1451 2016-09-19 22:45 config/config.php

... but I still see a lot of "level":3 entries in owncloud .log ...

{... "File with id \"115579\" has not been found.","level":3,"time":"2016-09-21 14:09:18" ...}

Is there a way to clean the caching system?

@kostas707

This comment has been minimized.

Show comment
Hide comment
@kostas707

kostas707 Sep 23, 2016

I have same problem. Was loglevel 4. in logs was 3.

Just now changed to
'loglevel' => '1',
apache restart
in log files: "level":3

kostas707 commented Sep 23, 2016

I have same problem. Was loglevel 4. in logs was 3.

Just now changed to
'loglevel' => '1',
apache restart
in log files: "level":3

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81
Member

PVince81 commented Sep 23, 2016

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Sep 23, 2016

Member

https://github.com/owncloud/core/blob/master/lib/private/Log.php#L230

That could be the cause: log level will be "error" or lower.

@plabong @kostas707 Could you change that line to:

$minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);

and verify that it solve your issue? It's just to check there is a problem there. We might need to come to an agreement for the final solution.

Member

jvillafanez commented Sep 23, 2016

https://github.com/owncloud/core/blob/master/lib/private/Log.php#L230

That could be the cause: log level will be "error" or lower.

@plabong @kostas707 Could you change that line to:

$minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);

and verify that it solve your issue? It's just to check there is a problem there. We might need to come to an agreement for the final solution.

@kostas707

This comment has been minimized.

Show comment
Hide comment
@kostas707

kostas707 Sep 23, 2016

server$ sudo cat /var/www/owncloud/config/config.php | grep level
'loglevel' => '1',

server$ cat /var/www/owncloud/lib/private/Log.php | grep minLevel
/* $minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::ERROR); */
$minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);

server# apache restart, sudo tail -f /var/www/owncloud/data/owncloud.log:
. . . "level":3 . . .

kostas707 commented Sep 23, 2016

server$ sudo cat /var/www/owncloud/config/config.php | grep level
'loglevel' => '1',

server$ cat /var/www/owncloud/lib/private/Log.php | grep minLevel
/* $minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::ERROR); */
$minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);

server# apache restart, sudo tail -f /var/www/owncloud/data/owncloud.log:
. . . "level":3 . . .

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Sep 23, 2016

Member

Just to make sure, the changes applies to new log entries. A change in the log level won't erase old entries so they will keep appearing in the log file.

Member

jvillafanez commented Sep 23, 2016

Just to make sure, the changes applies to new log entries. A change in the log level won't erase old entries so they will keep appearing in the log file.

@plabong

This comment has been minimized.

Show comment
Hide comment
@plabong

plabong Sep 24, 2016

@jvillafanez yepp, it solves my issue.

plabong commented Sep 24, 2016

@jvillafanez yepp, it solves my issue.

@ccheveaux

This comment has been minimized.

Show comment
Hide comment
@ccheveaux

ccheveaux Sep 27, 2016

Same !
Thx 👍

ccheveaux commented Sep 27, 2016

Same !
Thx 👍

@jvillafanez

This comment has been minimized.

Show comment
Hide comment
@jvillafanez

jvillafanez Sep 27, 2016

Member

Fix will be included in 9.2 and 9.1.2 whenever they're released.

Member

jvillafanez commented Sep 27, 2016

Fix will be included in 9.2 and 9.1.2 whenever they're released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment