Skip to content

Is there a way to contribute non-standard submodes #52

Description

@stasvlasov

I spend some time configuring additional submode for viewing CUPS (printing system) 'error_log' file with is usually located at /var/log/cups/error_log

The problem was that THREAD field that was optional and I had to use regex in format.

I ended up with following and it works for me. I was wondering how I should to contribute this little bit as this could be too specific for adding to logview-std-submodes.

(setq logview-additional-submodes
        '(("CUPS(error_log)"
           (format . "LEVEL [TIMESTAMP]<<RX:THREAD:\\(?:[ \t]+\\[[^]\n]+\\][ \t]+\\|[ \t]+\\)>>MESSAGE")
           (levels . "CUPS(error_log)")
           (timestamp . ("CUPS(error_log)")))))
  (setq logview-additional-level-mappings 
        '(("CUPS(error_log)"
           (error "E")
           (warning "W")
           (information "I")
           (debug "D")
           (trace))))
  (setq logview-additional-timestamp-formats
        '(("CUPS(error_log)"
           (java-pattern . "dd/MMM/yyyy:HH:mm:ss Z"))))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions