Thanks for your thoughtful comments! :)
On Saturday, March 1, 2014 6:54:34 AM UTC+1, Vinny P wrote: > > On Fri, Feb 28, 2014 at 2:44 AM, stephanos <[email protected]<javascript:> > > wrote: > >> Thanks for your detailed answer, Vinny! >> >> We don't use Google authentication but our own, so I guess we are out of >> luck and have to resort to matching simple log messages. I'm wondering, >> regular expression wise, what would be the best way to mark each request >> with the user and company name. The goal would be to have zero accidental >> matches of other log messages. >> >> Maybe something like: >> >> *<user:bob.harris> <company:google>* >> >> >> So by using '<' and '>' as well as an identifier I could match requests >> made by a person or a company. >> >> Do you think there is a better way? >> > > > > No, that sounds like a good plan. The only thing I would add is to make > sure the identifier is on it's own log line and perhaps prefix the line > with a special, reserved token. For example, you could write this into > logging: > > *ID Token - < User:bob > < Company:google >* > > Then when you parse the logs using your analyzer, you can first look for > log lines prefixed with *ID Token*. If you match the prefix, then you > know that this is an ID, and then you can parse out the username and the > company. > > This does two things: it simplifies the code in your matcher and also > provides a layer of error-checking: without the prefixing token check, a > regex might accidentally match some other log information that isn't > intended to be ID data. > > > > ----------------- > -Vinny P > Technology & Media Advisor > Chicago, IL > > App Engine Code Samples: http://www.learntogoogleit.com > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
