case QUOTA_ALLOC_RESULT_TEMPFAIL:
/* Log the error, but allow saving anyway. */
e_error(qt->quota->event,
- "quota: Failed to check if user is under quota: %s - "
+ "Failed to check if user is under quota: %s - "
"saving mail anyway", error);
return 0;
case QUOTA_ALLOC_RESULT_BACKGROUND_CALC:
/* Could not determine if there is enough space due to ongoing
background quota calculation, allow saving anyway. */
e_warning(qt->quota->event,
- "quota: Failed to check if user is under quota: %s - "
+ "Failed to check if user is under quota: %s - "
"saving mail anyway", error);
return 0;
default:
if (quota_transaction_set_limits(qt, &error_res, &error) < 0) {
if (error_res == QUOTA_GET_RESULT_BACKGROUND_CALC) {
e_warning(qt->quota->event,
- "quota: %s - copying mail anyway", error);
+ "%s - copying mail anyway", error);
} else {
e_error(qt->quota->event,
- "quota: %s - copying mail anyway", error);
+ "%s - copying mail anyway", error);
}
}
case QUOTA_ALLOC_RESULT_TEMPFAIL:
/* Log the error, but allow saving anyway. */
e_error(qt->quota->event,
- "quota: Failed to check if user is under quota: %s - "
+ "Failed to check if user is under quota: %s - "
"saving mail anyway", error);
break;
case QUOTA_ALLOC_RESULT_BACKGROUND_CALC:
* ongoing background quota calculation, allow saving
* anyway. */
e_warning(qt->quota->event,
- "quota: Failed to check if user is under quota: %s - "
+ "Failed to check if user is under quota: %s - "
"saving mail anyway", error);
break;
default:
if (quota_transaction_set_limits(qt, &error_res, &error) < 0) {
if (error_res == QUOTA_GET_RESULT_BACKGROUND_CALC)
e_warning(qt->quota->event,
- "quota: %s - saving mail anyway", error);
+ "%s - saving mail anyway", error);
else
e_error(qt->quota->event,
- "quota: %s - saving mail anyway", error);
+ "%s - saving mail anyway", error);
}
return qbox->module_ctx.super.save_begin(ctx, input);
root->ns_prefix);
if (root->ns == NULL && !silent_errors) {
e_error(root->quota->event,
- "quota: Unknown namespace: %s",
+ "Unknown namespace: %s",
root->ns_prefix);
}
}
if ((ns->flags & NAMESPACE_FLAG_UNUSABLE) != 0 &&
!silent_errors)
e_error(root->quota->event,
- "quota: Unknown namespace: %s", name);
+ "Unknown namespace: %s", name);
}
}
if (root->backend.v.init != NULL) {
root->backend.event = event_create(quota->event);
+ event_drop_parent_log_prefixes(root->backend.event, 1);
event_set_forced_debug(root->backend.event, root->quota->set->debug);
if (root->backend.v.init(root, root_set->args, error_r) < 0) {
quota = i_new(struct quota, 1);
quota->event = event_create(user->event);
event_set_forced_debug(quota->event, quota_set->debug);
+ event_set_append_log_prefix(quota->event, "quota: ");
quota->user = user;
quota->set = quota_set;
i_array_init("a->roots, 8);
restrict_access_init(&set.restrict_set);
- e_debug(root->quota->event, "quota: Executing warning: %s (because %s)", cmd, reason);
+ e_debug(root->quota->event, "Executing warning: %s (because %s)", cmd, reason);
args = t_strsplit_spaces(cmd, " ");
if (last_arg != NULL) {
name = t_strconcat(root->set->set_name, "_over_script", NULL);
*quota_over_script_r = mail_user_plugin_getenv(root->quota->user, name);
if (*quota_over_script_r == NULL) {
- e_debug(root->quota->event, "quota: quota_over_flag check: "
+ e_debug(root->quota->event, "quota_over_flag check: "
"%s unset - skipping", name);
return FALSE;
}
name = t_strconcat(root->set->set_name, "_over_flag_value", NULL);
flag_mask = mail_user_plugin_getenv(root->quota->user, name);
if (flag_mask == NULL) {
- e_debug(root->quota->event, "quota: quota_over_flag check: "
+ e_debug(root->quota->event, "quota_over_flag check: "
"%s unset - skipping", name);
return FALSE;
}
if (root->quota->user->session_create_time +
QUOTA_OVER_FLAG_MAX_DELAY_SECS < ioloop_time) {
/* userdb's quota_over_flag lookup is too old. */
- e_debug(root->quota->event, "quota: quota_over_flag check: "
+ e_debug(root->quota->event, "quota_over_flag check: "
"Flag lookup time is too old - skipping");
return;
}
/* we don't know whether the quota_over_script was executed
before hibernation. just assume that it was, so we don't
unnecessarily call it too often. */
- e_debug(root->quota->event, "quota: quota_over_flag check: "
+ e_debug(root->quota->event, "quota_over_flag check: "
"Session was already hibernated - skipping");
return;
}
&limit, &error);
if (ret == QUOTA_GET_RESULT_INTERNAL_ERROR) {
/* can't reliably verify this */
- e_error(root->quota->event,
- "quota: Quota %s lookup failed - can't verify quota_over_flag: %s",
+ e_error(root->quota->event, "Quota %s lookup failed -"
+ "can't verify quota_over_flag: %s",
resources[i], error);
return;
}
- e_debug(root->quota->event, "quota: quota_over_flag check: %s ret=%d value=%"PRIu64" limit=%"PRIu64,
- resources[i], ret, value, limit);
+ e_debug(root->quota->event, "quota_over_flag check: %s ret=%d"
+ "value=%"PRIu64" limit=%"PRIu64, resources[i], ret,
+ value, limit);
if (ret == QUOTA_GET_RESULT_LIMITED && value >= limit)
cur_overquota = TRUE;
}
- e_debug(root->quota->event, "quota: quota_over_flag=%d(%s) vs currently overquota=%d",
+ e_debug(root->quota->event, "quota_over_flag=%d(%s) vs currently overquota=%d",
quota_over_status ? 1 : 0,
quota_over_flag == NULL ? "(null)" : quota_over_flag,
cur_overquota ? 1 : 0);