File

misc/mtail/prosody.mtail @ 5997:d3812826c1cd

mod_csi_muc_priorities: Allow setting the default priority for mucs to low Move the priority checking after the mention check so that if there is a mention we return true. Add an option to the form to set the default priority to low. Return `nil` in cases where we determite that the priority should be high, as with `mod_csi_simple` this causes normal MUC messages to be marked important while allowing mod_csi_grace_period and unneeded messages to be queued.
author aereaux <aidan@jmad.org>
date Sun, 22 Sep 2024 08:13:09 -0700
parent 5671:c217f4edfc4f
line wrap: on
line source

counter prosody_log_messages by level

/^(?P<date>(?P<legacy_date>\w+\s+\d+\s+\d+:\d+:\d+)|(?P<rfc3339_date>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d+[+-]\d{2}:\d{2})) (?P<sink>\S+)\s(?P<loglevel>\w+)\s(?P<message>.*)/ {
	len($legacy_date) > 0 {
		strptime($2, "Jan _2 15:04:05")
	}
	len($rfc3339_date) > 0 {
		strptime($rfc3339_date, "2006-01-02T03:04:05-0700")
	}
	$loglevel != "" {
		prosody_log_messages[$loglevel]++
	}
}