Forum: Managing VoltDB

Post: logging of failed inserts

logging of failed inserts
Sabrina
Feb 20, 2016
Hi,

I tried the logging functionality of voltdb. I used the default /opt/voltdb/voltdb/log4j.xml file and edited the log level from ADHOC to FAILRE oder ERROR. But I receive nothing in the log. After editing the log level to ALL I received every INSERT statement:

2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: === statements=1 parameters=10 read-only=no single-partition=yes user=sys-admin groups=[administrator]
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Statement #1: insert into customer values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Parameter #1: 1751
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Parameter #2: 1
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Parameter #3: 0
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Parameter #4: oowbrturhuovu
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Parameter #5: dtbumibvureyamdesibae
2016-02-20 19:05:23,875 DEBUG [Ad Hoc Planner - 0] ADHOC: Parameter #6: idocvdaetlphgcpgqljcpqs

Also the "good" ones - but I only want to log the failed insert statements.

Thanks.

Best regards,
Sabrina
pzhao
Feb 22, 2016
Sabrina,
Let's try and get the right output in the logs. Here are a list of valid logger levels in log4j.xml:
TRACE, DEBUG, INFO, WARN, ERROR and FATAL.
Once you start seeing the desired output, we can then start on only failed insert statements.
Peter Zhao
Sabrina
Feb 22, 2016
Hi Peter,

ok, thanks. Is it possible to set INFO and WARN both together? Where is the difference between ERROR and FATAL?

Thanks.

Best regard,
Sabrina
bballard
Feb 22, 2016
Hi Sabrina,

The Log4J levels go from superset to subset. TRACE contains everything, FATAL is the smallest subset. INFO contains both INFO-level and WARN-level messages (as well as ERROR and FATAL). ERROR includes all errors, FATAL includes only fatal errors.

However, a SQL Error is returned to the user, and doesn't rise to the level of a system-level error in the database log. I think the only way to see the SQL statements is to lower the logging level until all of the SQL statements are logged, which may or may not show anything as far whether any of them resulted in a result or in a SQL error. For that, you may need to add some logging to your client.