Log via helper

pull/1/head
Victor Dubiniuk 10 years ago
parent e4ce2258e1
commit 674f3bb0a5

@ -22,7 +22,7 @@ class Converter {
} }
if (empty($output)){ if (empty($output)){
\OCP\Util::writeLog('Documents', 'Empty conversion output', \OCP\Util::WARN); Helper::warnLog('Empty conversion output');
throw new \RuntimeException('Empty conversion output'); throw new \RuntimeException('Empty conversion output');
} }
return $output; return $output;
@ -84,7 +84,7 @@ class Converter {
curl_setopt_array($ch, $options); curl_setopt_array($ch, $options);
$content = curl_exec($ch); $content = curl_exec($ch);
if (curl_errno($ch)){ if (curl_errno($ch)){
\OCP\Util::writeLog('Documents', 'cURL error' . curl_errno($ch) . ':' . curl_error($ch), \OCP\Util::DEBUG); Helper::debugLog('cURL error' . curl_errno($ch) . ':' . curl_error($ch));
} }
curl_close($ch); curl_close($ch);

@ -158,8 +158,8 @@ class Helper {
} }
if (empty($cmd)){ if (empty($cmd)){
\OCP\Util::writeLog('Documents', 'Pure configuration issue. Missing open office binary that is mandatory for conversion.', \OCP\Util::WARN); Helper::warnLog('Pure configuration issue. Missing open office binary that is mandatory for conversion.');
\OCP\Util::writeLog('Documents', 'If openoffice or libreoffice is already installed please specify the path to it using preview_libreoffice_path config. Refer to admin manual for details.', \OCP\Util::WARN); Helper::debugLog('If openoffice or libreoffice is already installed please specify the path to it using preview_libreoffice_path config. Refer to admin manual for details.');
throw new \RuntimeException('Missing open office binary that is mandatory for conversion.'); throw new \RuntimeException('Missing open office binary that is mandatory for conversion.');
} }

Loading…
Cancel
Save