Modify ↓
Opened 10 years ago
#11985 new enhancement
Periodically checks of log
Reported by: | Franz | Owned by: | Franz |
---|---|---|---|
Priority: | normal | Component: | LogWatcherPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Periodically checks of log would be very useful. This means log-files are checked periodically (e.g. every 120 seconds) for any search pattern.
Example Use Case: When there is an Exception, leave a comment in a specific ticket; within this ticket users can add themselfs as "CC", so they will be automatically informed by email (if email is configured correctly).
Needed configuration in trac.ini
:
[logwatcher] # check interval in seconds, defaults to 120; 0 deactivates periodical checks check_interval = 120 # amount of failures before entry will be deactivated failure_limit = 10
Needed table:
create table logwatcher ( id serial, name text, log_destination text, search_pattern text, is_regex bool, is_casesens bool, surround_lines int, last_check timestamp, last_line int, ticket bigint, active bool, failures int );
Description of table logwatcher
:
ticket
: if ticket ID is specified, leave comment at ticket; opt: if it is null, create new ticketfailures
: if it has failed to execute search (e.g. ticket ID is not valid, file not found, etc.), increase failures; when failures reach a specific amout (e.g. 10) deactivate this entry
Attachments (0)
Note: See
TracTickets for help on using
tickets.