Issue Details (XML | Word | Printable)

Key: CORE-3539
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

TRACE: add ability for logging ERRORs that occur in runtime (lock conflicts, PK/UK/FK violations et al)

Created: 28/Jun/11 02:03 PM   Updated: 23/Apr/13 01:03 PM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.5.2, 3.0 Alpha 1

Time Tracking:
Not Specified

Issue Links:
Relate
 
Replace
 

Planning Status: Unspecified


 Description  « Hide
sibj.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 02/May/12 07:53 PM
The feature is committed into v2.5.2 and will be ported forward into v3.

New trace configuration parameter is added : "log_errors". It could be used in both <database> and <services> sections.
The parameter could have boolean value "true" or "false" (default). If "log_errors"set to "true" every time user status-vector
contains error or warning corresponding event will be placed into the trace output, for example :

2012-05-03T00:02:59.9390 (3324:0000000002D0A410) UNAUTHORIZED ATTACH_DATABASE
        TEST.FDB (ATT_0, SYSDBA, WIN1251, XNET:W2K3-X64)
        D:\IBExpert\ibexpert.exe:3196

2012-05-03T00:02:59.9390 (3324:0000000002D0A410) ERROR AT jrd8_attach_database
        TEST.FDB (ATT_0, SYSDBA, WIN1251, XNET:W2K3-X64)
        D:\IBExpert\ibexpert.exe:3196
335544472 : Your user name and password are not defined. Ask your database administrator to set up a Firebird login.

or

2012-05-03T00:04:16.4080 (3324:0000000002D0A410) ERROR AT jrd8_fetch
        TEST.FDB (ATT_11, SYSDBA:NONE, WIN1251, XNET:W2K3-X64)
        D:\IBExpert\ibexpert.exe:3196
335544321 : arithmetic exception, numeric overflow, or string truncation
335544778 : Integer divide by zero. The code attempted to divide an integer value by an integer divisor of zero.

  There are two new trace events : "ERROR" and "WARNING" followed by API entrypoint name which returns error.
Since tracing performed inside the engine (not inside y-valve or network listener) there will be "jrd8_XXX"
entrypoints names reported, not "isc_XXX" equivalents as could be expected.

  Transaction (statement) is not reported as part of "ERROR" and "WARNING" events as there could be no
transaction (statement) active at the point where error is catched. Database attachment or service connection
information is reported however.