correct way to Log from within Cayenne code?

From: Mike Kienenberger (mkienen..laska.net)
Date: Thu Feb 12 2004 - 17:15:14 EST

  • Next message: Mike Kienenberger: "Re: Optimistic Locking Progress report 5 - problems with Oracle 9i DATE/TIMESTAMP lockings"

    One of the things my optimistic locking patch does is logs which fields are
    bound to which attribute since null id attributes are not bound to a
    parameter.

    binding set parameter=1 to name=ARGUMENT8 value= type=12
    binding set parameter=2 to name=ARGUMENT6 value= type=12
    binding set parameter=3 to name=ARGUMENT5 value= type=12
    binding set parameter=4 to name=ARGUMENT3 value= type=12
    binding set parameter=5 to name=ARGUMENT2 value= type=12
    binding set parameter=6 to name=ARGUMENT7 value= type=12
    binding set parameter=7 to name=ARGUMENT9 value= type=12
    binding set parameter=8 to name=ARGUMENT4 value= type=12
    binding set parameter=9 to name=ARGUMENT1 value=Bank Account Number type=12
    binding id parameter=10 to name=ARGUMENT1 value=bank account number type=12
    binding id parameter=11 to name=LOCALIZATION_ID value=568 type=4
    binding id parameter=12 to name=STRING_NAME value=Invalid bank account
    number '{1}' specified. type=12
    binding id parameter=13 to name=STRING_VALUE value=Invalid bank account
    number '{1}' specified. type=12

    There doesn't appear to be a way in cayenne to generically log an activity.
    Do I need to create a specific method on QueryLogger to do this? In the
    short term, I used System.out.println(), but this is really something that
    should be logged at the DEBUG level with the QueryLogger.

    Maybe it's a moot point since this info probably doesn't have to be logged
    once its functional since the regular "batch bind" log info is probably
    sufficient, but the knowledge would probably be useful for the future.

    -Mike



    This archive was generated by hypermail 2.0.0 : Thu Feb 12 2004 - 17:15:12 EST