[SERVER-5092] Better named logging with tracing Created: 25/Feb/12  Updated: 14/Oct/15  Resolved: 01/Jul/14

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: 2.7.3

Type: New Feature Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Benety Goh
Resolution: Done Votes: 4
Labels: community-team, polish
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-13457 Not all rsMgr log messages start with... Closed
is depended on by SERVER-10327 too much logging when secondaries slo... Closed
is depended on by SERVER-14415 log component hierarchy Closed
is depended on by SERVER-14416 support use of BSON configuring sever... Closed
is depended on by DOCS-3694 Document named logging Closed
is depended on by SERVER-8245 logging cleanup: review severity of s... Closed
is depended on by SERVER-14417 migrate QLOG to kQuery LogComponent Closed
is depended on by SERVER-14467 Capture S2 debug log messages Closed
is depended on by SERVER-15380 Finish assigning default log componen... Closed
Duplicate
duplicates SERVER-1044 more quiet logging Closed
duplicates SERVER-4282 clean up log messages Closed
Related
related to SERVER-14729 Add log component to non-debug messages Closed
related to SERVER-14965 assign accessControl log component to... Closed
related to SERVER-15592 Enforce default log component specifi... Closed
related to SERVER-14111 logging cleanup: Remove tlog function... Closed
related to SERVER-14113 logging cleanup: Remove dlog function... Closed
related to SERVER-15426 Add shell helpers for new log compone... Closed
related to SERVER-15486 Improve setParameter logComponentVerb... Closed
related to SERVER-4217 add log severity and component name t... Closed
related to SERVER-10101 Make log files more machine-parsable Closed
related to SERVER-16209 Simplify log component names Closed
is related to SERVER-8552 setParameter command has confusing be... Backlog
is related to SERVER-9239 Mongo Server does not close stdout wh... Closed
is related to SERVER-7450 Syslog levels correspond incorrectly ... Closed
is related to SERVER-5175 Need "failpoints" system to facilitat... Closed
is related to SERVER-85138 guide for log messages and debug levels Closed
is related to SERVER-7454 syslog should include facility inform... Closed
is related to SERVER-8825 Write stack traces via logging framew... Closed
is related to SERVER-15550 Change "S2" log component to "Geo" Closed
Sprint: Server 2.7.3
Participants:

 Description   

Add a name option to LOG that can be conditionally defined.

Currently just have

LOG(1)

want to add

LOG( "foo" )

LOG( "foo" , 4 )

Will be an c++ api and command to set a log level for any name.

Names maybe should be dotted to do hierarchies?
foo.bar

then set foo and works for all foo.*



 Comments   
Comment by Githook User [ 08/Aug/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 qualify LogstreamBuilder and getThreadName in MONGO_LOG macros
Branch: master
https://github.com/mongodb/mongo/commit/adc36ff6450b1ee493b9acd26d3e79bd4facf953

Comment by Githook User [ 16/Jul/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 removed logLevel_* server parameters. these have been replaced by a single server parameter logComponentVerbosity
Branch: master
https://github.com/mongodb/mongo/commit/269682556e6195d69099baa53ef50b5b70a11739

Comment by Githook User [ 16/Jul/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 basic.h should not be present in a header context
Branch: master
https://github.com/mongodb/mongo/commit/2c6a5148e1b93c2393c3e78bfab0cb109bd19527

Comment by Githook User [ 01/Jul/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 assign default log component to server modules
Branch: master
https://github.com/mongodb/mongo/commit/f8c98bee1208e04259814e0818f405081132d42c

Comment by Githook User [ 30/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 removed LogTag typedef and macros.

These were used for backwards compatibility in source files that were
declaring the default log tag/component using the old macros and log
tags in logger::LogTag (now renamed to LogComponent).
Branch: master
https://github.com/mongodb/mongo/commit/95ad239c59e91b295b16a9a3e61c606a1e5be26e

Comment by Githook User [ 30/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 updated default log component in storage and networking subsystems
Branch: master
https://github.com/mongodb/mongo/commit/619bc69cea6b8b6b543c26b6b0246af704916fd6

Comment by Githook User [ 30/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 renamed LogTag to LogComponent
Branch: master
https://github.com/mongodb/mongo/commit/30ac4291346859a24fbd5f17b8b99ca598bcab69

Comment by Githook User [ 27/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 tagged storage and networking LOG() messages
Branch: master
https://github.com/mongodb/mongo/commit/a67bddc57c9b8a8d9d13ac30ebe74f9914b0c6d0

Comment by Githook User [ 27/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 added server parameters for tag log levels
Branch: master
https://github.com/mongodb/mongo/commit/b08b3ae8320d747f25da30f3fca939051707677c

Comment by Githook User [ 27/Jun/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5092 support log tags for LOG() messages
Branch: master
https://github.com/mongodb/mongo/commit/4d00dd9723f84f197afffd901101276916d1ee6c

Comment by Eliot Horowitz (Inactive) [ 16/Mar/12 ]

We already have the macro and it can be server and cpp only.
assert is bad for different reasons

Comment by Chris Westin [ 16/Mar/12 ]

Using macros like this is bad because they aren't scoped (i.e., don't belong
to a class or other namespace-like device), and have a risk of colliding.
We've already had problems with assert() because of our attempt to take it
over from boost. If the check for on/off is part of a class, we can make it
inlined for performance, but it will still have the benefit of being in our
namespace.

Generated at Thu Feb 08 03:07:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.