3

I understand that queries can be logged via odb::tracer. The output looks something like this:

INSERT INTO "event" ("id", "date","seq") VALUES ($1, $2, $3)

How about the parameters' values?, i.e. how to see the actual values of $1, $2, $3 in the stdout (for troubleshooting)?

doraemon
  • 403
  • 6
  • 15
  • That's weird, aren't they there with `t.tracer(odb::stderr_tracer);`? Are the properties not-null? – Superlokkus May 29 '17 at 19:09
  • I mean the value of $1 $2 and $3. Do you see them in stderr when you use odb::stderr_tracer? I do not see them. All I see is the sql shown in the question. And yes the columns are not null. – doraemon May 30 '17 at 15:35
  • Hmm I guess you could simply print out the properties of your object yourself (a good object class should have IMHO an operator<< overload see https://github.com/Superlokkus/realtime_scheduling/blob/master/src/task_lib/task.hpp#L38 ) or ask on the odb mailing list for the feature. – Superlokkus Jun 02 '17 at 09:41

0 Answers0