Filtering firebird.log in services

Implemented is one idea regarding removing unneeded records from firebird.log using regular expressions. Added are 2 new SPB parameters - isc_spb_log_filter and isc_spb_log_date. First parameter is SQL-stytle regular expression, second is useful to quickly select records for last 3 days (week, month, etc.) - it sets date since which records are returned. Date is transfered in SPB as ISC_DATE (i.e. 4-bytes integer, interbase date format).

Sample of use in fbsvcmgr:

 $ fbsvcmgr service_mgr action_get_fb_log log_filter '%firebird/security3%' log_date 20181010

Will return records containing 'firebird/security3' that arrived after 10 Oct (today, including this date).

Record in firebird.log like:

 fbs3    Mon Oct  1 18:02:34 2018
     Crypt thread:
     database /tmp/restore.fdb shutdown in progress

is treated as whole entity - no matter in what line regular expression is satisfied all record is shown.

back to top of page
<< Create database from a execute statement on external | Firebird Special Edition by IBExpert | >>