mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 19:41:26 +01:00
Add translation for bad log level
This commit is contained in:
@@ -1627,7 +1627,7 @@ function dol_ucwords($string, $encoding = "UTF-8")
|
|||||||
*/
|
*/
|
||||||
function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = '', $restricttologhandler = '', $logcontext = null)
|
function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = '', $restricttologhandler = '', $logcontext = null)
|
||||||
{
|
{
|
||||||
global $conf, $user, $debugbar;
|
global $conf, $user, $debugbar, $langs;
|
||||||
|
|
||||||
// If syslog module enabled
|
// If syslog module enabled
|
||||||
if (empty($conf->syslog->enabled)) {
|
if (empty($conf->syslog->enabled)) {
|
||||||
@@ -1658,11 +1658,10 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
|
|||||||
if (!empty($message)) {
|
if (!empty($message)) {
|
||||||
// Test log level
|
// Test log level
|
||||||
$logLevels = array(LOG_EMERG=>'EMERG', LOG_ALERT=>'ALERT', LOG_CRIT=>'CRITICAL', LOG_ERR=>'ERR', LOG_WARNING=>'WARN', LOG_NOTICE=>'NOTICE', LOG_INFO=>'INFO', LOG_DEBUG=>'DEBUG');
|
$logLevels = array(LOG_EMERG=>'EMERG', LOG_ALERT=>'ALERT', LOG_CRIT=>'CRITICAL', LOG_ERR=>'ERR', LOG_WARNING=>'WARN', LOG_NOTICE=>'NOTICE', LOG_INFO=>'INFO', LOG_DEBUG=>'DEBUG');
|
||||||
$defaultLogLevel = getDolGlobalInt('DEFAULT_SYSLOG_LEVEL', $logLevels[LOG_ERR]);
|
|
||||||
|
|
||||||
if (!array_key_exists($level, $logLevels)) {
|
if (!array_key_exists($level, $logLevels)) {
|
||||||
dol_syslog('The given log level does not correspond to any of the available levels: '.$level, LOG_ERR);
|
dol_syslog($langs->trans('ErrorBadLogLevel', $level), LOG_ERR);
|
||||||
$level = $defaultLogLevel;
|
$level = getDolGlobalInt('DEFAULT_SYSLOG_LEVEL', $logLevels[LOG_ERR]);
|
||||||
}
|
}
|
||||||
if ($level > $conf->global->SYSLOG_LEVEL) {
|
if ($level > $conf->global->SYSLOG_LEVEL) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ ErrorPHPNeedModule=Error, your PHP must have module <b>%s</b> installed to use t
|
|||||||
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
|
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
|
||||||
ErrorWarehouseMustDiffers=Source and target warehouses must differs
|
ErrorWarehouseMustDiffers=Source and target warehouses must differs
|
||||||
ErrorBadFormat=Bad format!
|
ErrorBadFormat=Bad format!
|
||||||
|
ErrorBadLogLevel=The given log level does not correspond to any of the available levels: %s
|
||||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any third party. Link member to an existing third party or create a new third party before creating subscription with invoice.
|
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any third party. Link member to an existing third party or create a new third party before creating subscription with invoice.
|
||||||
ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused.
|
ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused.
|
||||||
ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank entry that was reconciled
|
ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank entry that was reconciled
|
||||||
|
|||||||
Reference in New Issue
Block a user