[SERVER-4217] add log severity and component name to the log message Created: 04/Nov/11 Updated: 03/Jan/18 Resolved: 29/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.5 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Dominik Gehl | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 12 |
| Labels: | polish | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Server 2.7.4, Server 2.7.5 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
New format: Log severity is logged with a single capital letter. -------------- It would be immensely useful if the mongo log would contain for each message the given log level. Currently it's almost impossible to do some automatic log querying (for example with logwatch) since you have to manually filter based on regular expressions what could possible be interesting to see. If a log level was saved with the log message, it would be possible to simply grep for 'warning' or 'error' |
| Comments |
| Comment by Githook User [ 28/Aug/14 ] | |||||||||||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |||||||||||||
| Comment by Githook User [ 30/Jul/14 ] | |||||||||||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |||||||||||||
| Comment by Derick Rethans [ 30/Jul/14 ] | |||||||||||||
|
Looks good - the only thing I would possible consider is to not have an empty field, like is done here for the ```dropAllDatabasesExceptLocal``` entry:
I think it'd make sense to have something there - for easier parsing. | |||||||||||||
| Comment by Benety Goh [ 30/Jul/14 ] | |||||||||||||
|
Sample log output from replicasets/reindex_secondary.js:
| |||||||||||||
| Comment by Githook User [ 29/Jul/14 ] | |||||||||||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Log severity is logged with a single capital letter. |