[MAGNOLIA-3201] Additional info added to log4j MDC for easier debugging Created: 13/May/10 Updated: 23/Jan/13 Resolved: 13/May/10 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.3.1 |
| Fix Version/s: | 4.3.2 |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Fabrizio Giustina | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
ContextFilter actually sets request uri and userid to log4j MDC to simplify debugging, we could add a few more useful items like referral, session id and user agent |
| Comments |
| Comment by Fabrizio Giustina [ 13/May/10 ] |
|
done for 4.3.2, sample log4j xml file updated |
| Comment by Jan Haderka [ 13/May/10 ] |
|
Is this really necessary? |
| Comment by Fabrizio Giustina [ 13/May/10 ] |
|
well, it's not actually for "debugging": this informations are added to the error logs (usually only for error/fatal level and only in the mail appender when enabled) and are particularly useful for production enviroments. This doesn't hurt and doesn't add any performance overhead, so it's nice to have it available as a default... =================================== Mywebsite author Version: 1.0.5 Server: ucz99921 Url: http://author.website.it/thepage.html Referer: http://author.website.it/.magnolia/trees/website.html?mgnlCK=1273572473867 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9 Remote-Host: 195.43.170.198 Session Id: 72713AD331348DAAF20735B9C7A2A56D.author Userid: john Number of occurrences: 2 =================================== [node1] ERROR 07.05.2010 08:48:38 net.sourceforge.openutils.mgnlcriteria.advanced.impl.QueryExecutorHelper QueryExecutorHelper.java(execute:108) - An error occurred while executing a query. Xpath query was //website//*[( (@jcr:primaryType='mgnl:content') and ( jcr:contains(@title, '\(ai\:\)\(n\)\(uk\)') ) )] order by @jcr:score descending. Exception message is Exception building query: org.apache.lucene.queryParser.ParseException: Cannot parse '\(ai\:\\)\(n\)\(uk\)': Encountered " ")" ") "" at line 1, column 8. Was expecting one of: <EOF> <AND> ... <OR> ... <NOT> ... "+" ... "-" ... "(" ... "*" ... "^" ... <QUOTED> ... <TERM> ... <FUZZY_SLOP> ... <PREFIXTERM> ... <WILDTERM> ... "[" ... "{" ... <NUMBER> ... =================================== |