Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-1730

Improve pystachio Logger schema

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Client, Executor
    • None

    Description

      The current pystachio Logger schema is less than ideal, requiring a ~redundant mode and rotate fields. A plan was discussed in the context of AURORA-1724 in review https://reviews.apache.org/r/49399/ that would end us at something like:

      class Standard(Struct):
        pass
      
      class Rotate(Struct):
        log_size = Default(Integer, 100*MB)
        backups = Default(Integer, 5)
      
      class Logger(Struct):
        destination = Default(LoggerDestination, LoggerDestination('file'))
        mode = Default(Choice(Standard, Rotate), Standard())
      

      This will require a deprecation period though with something like:

      Rotate = RotatePolicy
      
      class Logger(Struct):
        destination = Default(LoggerDestination, LoggerDestination('file'))
        mode = Default(Choice(LoggerMode, Standard, Rotate), Standard())
        rotate = RotatePolicy
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jsirois John Sirois
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: