Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45783

Add styleguide section in logv2/README.md

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.4
    • None
    • None
    • None
    • Fully Compatible
    • Dev Tools 2020-02-10

    Description

      From Bruce:

      For example, maybe something like:

      • "msg" fields (the simple variety) should be pithy noun phrase or sentence describing what is being reported. Initial capital, ending with period .
      • attributes should be a small number of camel-case words succinctly describing the relationship of the attribute to what is being reported in a way that's understandable to someone with a reasonable knowledge of mongod behavior as viewed externally. These would be similar to C++ identifiers, except that unlike C++ identifiers they shouldn't depend on surrounding code context to understand. Depending on "msg" content to understand is ok. Maybe method names in an interface would be a better comparison than variable names?
      • Simple fixed string messages with no additional information needed should be contained in the "msg" field with no attributes. (This is prompted be a counter-example I saw in a log file that looked something like "msg": "{message}", "attr": {"message": "actual message for real now"}. I felt my eyes beginning to bleed. )

      Attachments

        Activity

          People

            henrik.edin@mongodb.com Henrik Edin
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: