Skip to content

Support users defining/registering their own format directives #34

@jwodder

Description

@jwodder

(Including %{*}t subdirectives)

  • Provide functions like register_plain_directive(directive, name, pattern, converter)
  • Add a DirectiveRegistry class with methods for registering new directives so that we aren't modifying the global state?
    • Make the LogParser constructor "private" and have instances instead be constructed through a method of DirectiveRegistry, with a global function version provided that uses a private registry of default values only?
      • Alternatively, give the LogParser constructor a registry=None argument that defaults to the private default registry?
    • Give the DirectiveRegistry class parse() and parse_lines() methods, with the global functions operating on a private registry of default values only

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request thereforunder considerationDev has not yet decided whether or how to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions