github.com/mongodb/grip@v0.0.0-20240213223901-f906268d82b9/message/doc.go (about)

     1  /*
     2  package message defines the Composer interface and a handful of
     3  implementations which represent the structure for messages produced by grip.
     4  
     5  # Message Composers
     6  
     7  The Composer interface provides a common way to define messages, with
     8  two main goals:
     9  
    10  1. Provide a common interface for representing structured and
    11  unstructured logging data regardless of logging backend or interface.
    12  
    13  2. Provide a method for *lazy* construction of log messages so they're
    14  built *only* if a log message is over threshold.
    15  
    16  The message package also contains many implementations of Composer
    17  which should support most logging use cases. However, any package
    18  using grip for logging may need to implement custom composer types.
    19  
    20  The Composer implementations in the message package compose the Base
    21  type to provide some common functionality around priority setting and
    22  data collection.
    23  
    24  The logging methods in the Journaler interface typically convert all
    25  inputs into a reasonable Composer implementations.
    26  */
    27  package message
    28  
    29  // This file is intentionally documentation only.