Search code examples
aerospike

Aerospike UDF Logging - Elevating UDF error message


Aerospike UDF log messages are of the form:

Mar 09 2016 23:32:18 GMT: DEBUG (udf): (udf_rw.c:send_udf_failure:183) 
Non-special LDT or General UDF
Error(/opt/aerospike/usr/udf/lua/someFile.lua:33:
bad argument #1 to 'ipairs' (table expected, got nil))

Concern

The issue is that these are error-type messages (they break functionality), but are logged under the DEBUG level. If one is logging at INFO or WARN levels, ideally they would be able to see "Non-special LDT or General UDF Error" messages.

Question

Is it possible to configure "Non-special LDT or General UDF Error" messages to log at a higher level, while keeping other truly DEBUG-level UDF messages (e.g. urecord ... dirty(1)) at DEBUG?


Solution

  • You can only set log levels by a whole context, for example

    logging {
      file /var/log/aerospike.log {
        context any info
        context aggr critical
        context udf critical
        context query critical
      }
      file /var/log/lua.log {
        context any critical
        context aggr debug
        context udf debug
        context query debug
      }
    }
    

    The list of contexts is available using asinfo -v "log/" -l.