Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Allow JSON logging #32

Open
streeter opened this issue Dec 7, 2016 · 2 comments
Open

Allow JSON logging #32

streeter opened this issue Dec 7, 2016 · 2 comments

Comments

@streeter
Copy link

streeter commented Dec 7, 2016

I would like to be able to log a message with attached context. I don't see a way to do that right now. It seems like I can only log a string without any JSON context.

@streeter
Copy link
Author

@Yelles
Copy link

Yelles commented Nov 3, 2017

it's working for me :

NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
                    "text", @"key1",
                    "text", @"key2",
                    nil];
NSError* error;
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict
                                                   options:kNilOptions 
                                                     error:&error];

[[LELog sharedInstance] log:[[NSString alloc] 
               initWithData:jsonData 
                   encoding:NSUTF8StringEncoding]];

And in search log, this query works : key1=text

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants