thank you this worked. i had tried this per the documentation but
On Sep 20, 1:59 pm, Joe Francia <
j...@joefrancia.com> wrote:
> I'm not sure if your intention is to store the logMessage object or just the actual log message text. If you just want the text, then you'll need to change this line:
> NSString *insertSQL = [NSString stringWithFormat: @"INSERT INTO LOG (MSG) VALUES (\"%@\")", logMessage];
>
> to this:
> NSString *insertSQL = [NSString stringWithFormat: @"INSERT INTO LOG (MSG) VALUES (\"%@\")", logMessage->logMsg];
>
> If you really need to store the log message object (and you most likely don't need to do this), you'll need to serialize it using NSKeyedArchiver to create an NSMutableData object that you can then store in a BLOB. Just using the object as an argument to stringWithFormat will only give you the object's description, which defaults to <ClassName: obj_address> (unless you override -(NSString *)description).
>
> You may also want to read up on implementing a custom logger:
http://code.google.com/p/cocoalumberjack/wiki/CustomLoggers
>
> And on a side note, there's a really nice Obj-C wrapper around the sqlite3 lib here:
https://github.com/ccgus/fmdb
>
> --
> Joe Francia