Skip to content
Snippets Groups Projects
Commit b55f5af7 authored by Robin Appelman's avatar Robin Appelman Committed by GitHub
Browse files

Merge pull request #3364 from nextcloud/sass-logging

Lower log levels of resource locator
parents fa96b9e3 942465c8
No related branches found
No related tags found
No related merge requests found
...@@ -91,11 +91,11 @@ class CSSResourceLocator extends ResourceLocator { ...@@ -91,11 +91,11 @@ class CSSResourceLocator extends ResourceLocator {
$this->append($root, $this->scssCacher->getCachedSCSS($app, $file), false); $this->append($root, $this->scssCacher->getCachedSCSS($app, $file), false);
return true; return true;
} else { } else {
$this->logger->error('Failed to compile and/or save '.$root.'/'.$file, ['app' => 'core']); $this->logger->warning('Failed to compile and/or save '.$root.'/'.$file, ['app' => 'core']);
return false; return false;
} }
} else { } else {
$this->logger->error('Scss is disabled for '.$root.'/'.$file.', ignoring', ['app' => 'core']); $this->logger->debug('Scss is disabled for '.$root.'/'.$file.', ignoring', ['app' => 'core']);
return true; return true;
} }
} }
......
...@@ -75,7 +75,7 @@ abstract class ResourceLocator { ...@@ -75,7 +75,7 @@ abstract class ResourceLocator {
$this->doFind($resource); $this->doFind($resource);
} catch (ResourceNotFoundException $e) { } catch (ResourceNotFoundException $e) {
$resourceApp = substr($resource, 0, strpos($resource, '/')); $resourceApp = substr($resource, 0, strpos($resource, '/'));
$this->logger->error('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]); $this->logger->debug('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
} }
} }
if (!empty($this->theme)) { if (!empty($this->theme)) {
...@@ -84,7 +84,7 @@ abstract class ResourceLocator { ...@@ -84,7 +84,7 @@ abstract class ResourceLocator {
$this->doFindTheme($resource); $this->doFindTheme($resource);
} catch (ResourceNotFoundException $e) { } catch (ResourceNotFoundException $e) {
$resourceApp = substr($resource, 0, strpos($resource, '/')); $resourceApp = substr($resource, 0, strpos($resource, '/'));
$this->logger->error('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]); $this->logger->debug('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
} }
} }
} }
......
...@@ -69,7 +69,7 @@ class ResourceLocatorTest extends \Test\TestCase { ...@@ -69,7 +69,7 @@ class ResourceLocatorTest extends \Test\TestCase {
->with('foo') ->with('foo')
->will($this->throwException(new ResourceNotFoundException('foo', 'map'))); ->will($this->throwException(new ResourceNotFoundException('foo', 'map')));
$this->logger->expects($this->exactly(2)) $this->logger->expects($this->exactly(2))
->method('error') ->method('debug')
->with($this->stringContains('map/foo')); ->with($this->stringContains('map/foo'));
/** @var \OC\Template\ResourceLocator $locator */ /** @var \OC\Template\ResourceLocator $locator */
$locator->find(array('foo')); $locator->find(array('foo'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment