;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\306\307\310\311\312\313%\210\314\315\310\316\317\307\320\321&\207" [require hide-lines ido hi-lock net-utils ov custom-declare-group syslog nil "syslog-mode - a major mode for viewing log files" :link (url-link "https://github.com/vapniks/syslog-mode") custom-declare-variable syslog-mode-hook "*Hook to setup `syslog-mode'." :group :type hook] 8) #@44 *Hook to run when `syslog-mode' is loaded. (defvar syslog-mode-load-hook nil (#$ . -514)) #@68 *If not nil setup syslog mode on load by running syslog-add-hooks. (defvar syslog-setup-on-load nil (#$ . -610)) #@37 The local keymap for `syslog-mode'. (defvar syslog-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\313\314!\210\302\315\314#\210\302\316\317#\210\302\320\321#\210\302\322\323#\210\302\324\325#\210\302\326\327#\210\302\330\331#\210\302\332\333#\210\302\334\333#\210\302\335\336#\210\302\337\340#\210\302\341\342#\210\302\343\344#\210\302\345\346#\210\302\347\350#\210\302\351\352#\210\302\353\354#\210\302\355\356#\210\302\357\360#\210\302\361\362#\210\302\363\364#\210\302\365\366#\210\302\367\370#\210\371\372\373 \"\210)\207" [map make-sparse-keymap define-key [C-down] syslog-boot-start "R" revert-buffer "/" syslog-filter-lines "g" hide-lines-show-all define-prefix-command syslog-highlight-map "h" "hr" highlight-regexp "hp" highlight-phrase "hl" highlight-lines-matching-regexp "hu" unhighlight-regexp [67108911] syslog-filter-dates "D" #[nil "\301!\207" [syslog-log-file-directory dired] 2 nil nil] "j" ffap "f" "<" syslog-previous-file ">" syslog-next-file "o" syslog-open-files "a" syslog-append-files "p" syslog-prepend-files "v" syslog-view "c" syslog-count-matches "k" hide-lines-kill-hidden "W" syslog-whois-reverse-lookup "q" quit-window "!" syslog-shell-command [M-down] syslog-move-next-file [M-up] syslog-move-previous-file "t" syslog-toggle-filenames string-match "XEmacs" emacs-version] 4) (#$ . 729)) #@43 The first number used as rotation suffix. (defvar syslog-number-suffix-start 1 (#$ . 2133)) #@80 Execute a shell COMMAND synchronously, with prefix arg (SUDOP) run under sudo. (defalias 'syslog-shell-command #[(command &optional sudop) "\203\304\305\306\"r q\210\307\216\310\311\312\313\314\n#P!\210\315 !+\207\315 !\207" [sudop #1=#:temp-buffer default-directory command generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] cd "/sudo::" replace-regexp-in-string "^/sudo[^/]+" "" shell-command] 6 (#$ . 2231) (list (read-shell-command (if current-prefix-arg "Shell command (root): " "Shell command: ")) current-prefix-arg)]) #@169 Return the basename and number suffix of a log file in FILEPATH. Return results in a cons cell '(basename . number) where basename is a string, and number is a number. (defalias 'syslog-get-basename-and-number #[(filename) "\306\307\"\211\203\310\311\"\202 \205\310\312\"\211\203%\313 !\206'\fS\n ,B\207" [filename res basename str syslog-number-suffix-start num string-match "\\(.*?\\)\\.\\([0-9]+\\)\\(\\.t?gz\\)?" match-string 1 2 string-to-number] 4 (#$ . 2813)]) #@493 Get log files associated with PAIRS argument, or prompt user for files. The PAIRS argument should be a list of cons cells whose cars are paths to log files, and whose cdrs are numbers indicating how many previous log files (if positive) or days (if negative) to include. If PAIRS is missing then the user is prompted for those values. If ONLYONE is non-nil then the user is only prompted for a single file. The PROMPT argument is an optional prompt to use for prompting the user for files. (defalias 'syslog-get-filenames #[(&optional pairs prompt onlyone) "\306\307\n\206E\310\203B\311\f\206\312 \313\310$!\"\203#\307\202'\314\315 \"! B B\"\203:\310\211\202 \316\317!\211\204 \237)\320\n#\310\211$!\310\211%\310\211&'\310\211()\310\211*+\306,#:\203\260#@\211$@!$A\321!!\211%@&\322&!'%A( \307Y\203\234 \202\323\324\325!!8! \326_\\-\327\330!!\306'#.\310\211/0\3101\3062.:\203.@/\323\324\325/!8!\2110-Y\203\366\321/!A31\203\36113]\202\36331).A.\3102\202\3011.(Z)(T4()\\5\310\21167\3108\306945X\203\217\3314!6\332:\310\211;<\306\211=>\310?::\203x:@;&\3336;R<\334\202B?.\21178B84T4\3109\202\"8\237.*!C\335\336*\"\244\237+\244+#A#\310,\202j+\237.\f\337\340#+\207" [continue num pairs #1=#:--cl-var-- prompt syslog-log-file-directory t 0 nil ido-read-file-name "Log file: " "syslog" read-number "Number of previous files (if positive) or days (if negative) to include" y-or-n-p "Add more files? " cl-remove-duplicates syslog-get-basename-and-number file-name-nondirectory float-time 5 file-attributes 86400 directory-files file-name-directory number-to-string (nil ".gz" ".tgz") "." file-readable-p cl-remove-if null :test equal filename onlyone #2=#:--cl-var-- pair1 pair basename basename2 curver num2 files #3=#:--cl-var-- #4=#:--cl-var-- startdate #5=#:--cl-var-- file2 filedate2 #6=#:--cl-var-- #7=#:--cl-var-- #8=#:temp n #9=#:--cl-var-- numstr nextfile #10=#:--cl-var-- #11=#:--cl-var-- #12=#:--cl-var-- suffix filename3 #13=#:--cl-var-- #14=#:--cl-var-- #15=#:--cl-var--] 6 (#$ . 3304)]) #@303 Append FILES into buffer BUF. If REPLACE is non-nil then the contents of BUF will be overwritten. When called interactively the current buffer is used, FILES are prompted for using `syslog-get-filenames', and REPLACE is set to nil, unless a prefix argument is used in which case they are prompted for. (defalias 'syslog-append-files #[(files buf &optional replace) "rq\210\306\307\310!\210\212\311\n\312\313#\310 :\2036 @db\210`\314\f!\210db\210\315 `\316\f$\210) A\211\202-\310\207" [buf inhibit-read-only files #1=#:--cl-var-- file start t set-visited-file-name nil cl-remove-duplicates :test equal insert-file-contents put-text-property syslog-filename] 6 (#$ . 5490) (list (syslog-get-filenames nil "Append log file: ") (current-buffer) (if current-prefix-arg (y-or-n-p "Replace current buffer contents? ")))]) #@304 Prepend FILES into buffer BUF. If REPLACE is non-nil then the contents of BUF will be overwritten. When called interactively the current buffer is used, FILES are prompted for using `syslog-get-filenames', and REPLACE is set to nil, unless a prefix argument is used in which case they are prompted for. (defalias 'syslog-prepend-files #[(files buf &optional replace) "rq\210\306\307\310!\210\311\n\312\313#\310 :\2033 @eb\314\f!A@u\210\315 `\316\f$\210) A\211\202,\310\207" [buf inhibit-read-only files #1=#:--cl-var-- file start t set-visited-file-name nil cl-remove-duplicates :test equal insert-file-contents put-text-property syslog-filename] 6 (#$ . 6322) (list (syslog-get-filenames nil "Prepend log file: ") (current-buffer) (if current-prefix-arg (y-or-n-p "Replace current buffer contents? ")))]) #@57 Create a new buffer named after the files in FILENAMES. (defalias 'syslog-create-buffer #[(filenames) "\306\307\310\311\312#\"\306\313 \"\310\306\314\n\"\311\312#\315 \316\211\316\211 \316\317!\320\"\f:\203\220\f@\321\322\n\"\306\323\"\211 \203O\324\325 \"\202P\326 \203_\324\327 \"\202`\326! \330U\203u\331!\202\202\332\331!\333\331!\334\260\335RP!\fA\316\"\202.!.\326\336O!+\207" [filenames uniquefiles basenames basenames2 #1=#:--cl-var-- file mapcar file-name-nondirectory cl-remove-duplicates :test equal #[(x) "\301\302\303\304!#\207" [x replace-regexp-in-string "\\(\\.gz\\|\\.tgz\\)$" #2="" file-name-nondirectory] 5] #[(x) "\301\302\303#\207" [x replace-regexp-in-string "\\.[0-9]+$" #2#] 4] get-buffer-create nil #2# t cl-remove-if-not #[(x) "\303C! \304\305\306#)\207" [file x inhibit-changing-match-data regexp-opt nil t string-match] 7] #[(x) "\303\304\"\211\203\305\306\"\202\307\310\n!*\207" [x match n string-match "\\.\\([0-9]+\\)" match-string 1 "0" string-to-number] 4] apply min 0 max "." number-to-string "{" "-" "}" "," -1 files nums #3=#:--cl-var-- #4=#:--cl-var--] 10 (#$ . 7144)]) #@229 Insert log FILES into new buffer. If the optional argument LABEL is non-nil then each new line will be labelled with the corresponding filename. When called interactively the FILES are prompted for using `syslog-get-filenames'. (defalias 'syslog-open-files #[(files &optional label) "\306!r q\210\307\310\311!\210\312\313\314#\311 :\203L @db\315\f!\210db\210\203=\316y\210\317\320 `\321\f!\322P\311%b\210\323 `\324\f$\210) A\211\202+\325 \210\326@!)\327 !)\207" [files buf inhibit-read-only #1=#:--cl-var-- file start syslog-create-buffer t set-visited-file-name nil cl-remove-duplicates :test equal insert-file-contents 0 apply-on-rectangle string-rectangle-line file-name-nondirectory ": " put-text-property syslog-filename syslog-mode file-name-directory switch-to-buffer label default-directory] 7 (#$ . 8325) (list (syslog-get-filenames nil "View log file: ") (y-or-n-p "Label lines with filenames? "))]) #@1003 Open a view of syslog files with optional filters and highlights applied. When called interactively the user is prompted for a member of `syslog-views' and the arguments are determined from the chosen member. FILES can be either nil in which case the view is applied to the current log file, or it can be the same as the first argument to `syslog-get-filenames' - a list of cons cells whose cars are filenames and whose cdrs indicate how many logfiles to include. LABEL indicates whether or not to label each line with the filename it came from. RXSHOWSTART, RXSHOWEND and RXHIDESTART, RXHIDEEND are optional regexps which will be used to filter in/out blocks of buffer lines with `syslog-filter-lines'. STARTDATE and ENDDATE are optional dates used to filter the lines with `syslog-filter-dates'; they can be either date strings or time lists as returned by `syslog-date-to-time'. HIGHLIGHTS is a list of cons cells whose cars are regexps and whose cdrs are faces to highlight those regexps with. (defalias 'syslog-view #[(files &optional label rxshowstart rxshowend rxhidestart rxhideend startdate enddate removedates highlights bufname) "\306\211 !\n! !\f! !!!\2030\307\310!\"\210\311=\204=\312\313!\202\276 \203Q\n\203M\314 \n\"\210\202Q\315 !\210 \203e\f\203a\314 \f\"\210\202e\316 !\210 \204n\203v\317 #\210\203\264\320\211\320\321:\203\263@\211\211\211A\242\322\"\210A\320\202\213-\205\276\323\321\".\207" [#1=#:--cl-getstr-- rxshowstart rxshowend rxhidestart rxhideend startdate #[(str) "\301\230?\205\207" [str ""] 2] syslog-open-files syslog-get-filenames syslog-mode error "Not in syslog-mode" hide-blocks-not-matching hide-lines-not-matching hide-lines-matching syslog-filter-dates nil t highlight-regexp rename-buffer enddate bufname files label major-mode removedates highlights #2=#:--cl-var-- hl face regex #3=#:--cl-var--] 9 (#$ . 9261) (byte-code "\301\302\303\304\305\"\"\306\307$A\207" [syslog-views cl-assoc ido-completing-read "View: " mapcar car :test string=] 6)]) #@334 Open the previous logfile backup, or the next one if a prefix arg is used. Unix systems keep backups of log files with numbered suffixes, e.g. syslog.1 syslog.2.gz, etc. where higher numbers indicate older log files. This function will load the previous log file to the current one (if it exists), or the next one if ARG is non-nil. (defalias 'syslog-previous-file #[(&optional arg) "\306\307 !\211@A \203\nS\202\nT\211 SV\203' \310\311\f!Q\202( \312\313!\203<\314!\210\202r\313\315P!\203O\314\315P!\210\202r\313\316P!\203b\314\316P!\210\202r\313\317P!\203r\314\317P!\210\320ed\321$.\207" [pair basename curver arg nextver syslog-number-suffix-start syslog-get-basename-and-number syslog-get-filename-at-point "." number-to-string t file-readable-p find-file ".bz2" ".gz" ".tgz" put-text-property syslog-filename nextfile inhibit-read-only] 6 (#$ . 11357) "P"]) #@114 Open the next logfile. This just calls `syslog-previous-file' with non-nil argument, so we can bind it to a key. (defalias 'syslog-next-file #[nil "\300\301!\207" [syslog-previous-file t] 2 (#$ . 12267) nil]) #@145 Move to the next file in the current `syslog-mode' buffer. If ARG is non-nil (or called with numeric prefix arg), move that many files forward. (defalias 'syslog-move-next-file #[(&optional arg) "\303 \nX\203\304`\305\306d$b\210T\211\202*\306\207" [i arg #1=#:--cl-var-- 1 next-single-property-change syslog-filename nil] 6 (#$ . 12483) "p"]) #@145 Move to the next file in the current `syslog-mode' buffer. If ARG is non-nil (or called with numeric prefix arg), move that many files forward. (defalias 'syslog-move-previous-file #[(&optional arg) "\303 \nX\203\304`\305\306e$b\210T\211\202*\306\207" [i arg #1=#:--cl-var-- 1 previous-single-property-change syslog-filename nil] 6 (#$ . 12842) "p"]) #@53 Get the filename associated with the line at point. (defalias 'syslog-get-filename-at-point #[nil "\301`\302\"\206\207" [buffer-file-name get-text-property syslog-filename] 3 (#$ . 13208)]) #@150 Toggle the display of filenames before each line. If prefix ARG is positive display filenames, and if its negative hide them, otherwise toggle them. (defalias 'syslog-toggle-filenames #[(&optional arg) "\212\306\307 \310\311#\210eb\312 \211\205\313\314\315\316 !!\317Q! \203'\320 !\202(\321\322\323`\324\311d$b\203\210`U\204\210\n\203V\f\321X\203q\325\326\327\321!\330\321!G\\\311$\210\202q\f\321W\204q\325\331\327\321!\316 !\317P\311%\210\332`\324 $\210`\312 \211\205\204\313\314\315\316 !!\317Q!\202+-\306\307 \310\333#)\207" [start filename fileshownp arg hidep inhibit-read-only ov-set ov-in invisible nil syslog-get-filename-at-point looking-at "^" regexp-quote file-name-nondirectory ": " prefix-numeric-value 0 t next-single-property-change syslog-filename apply-on-rectangle delete-rectangle-line line-beginning-position match-string string-rectangle-line put-text-property hl] 7 (#$ . 13408) "P"]) #@188 Restrict buffer to blocks of text between matching regexps. If the user only enters one regexp then just filter matching lines instead of blocks. With prefix ARG: remove matching blocks. (defalias 'syslog-filter-lines #[(&optional arg) "\305V\203\n\306\202 \307\310\311\312 \"\313\314 !\"\310\311\315 \"!\316ed\"G\n\317\230?\205e\305V\203F \317\230\203>\320\n!\210\202X\321\n \"\210\202X \317\230\203S\322\n!\210\202X\323\n \"\210\f\316ed\"GU\205e\324\325!,\207" [arg str startregex endregex n 1 "to remove" "to keep" read-regexp format "Regexp matching start lines of blocks %s" symbol-name symbol-at-point "Regexp matching end lines of blocks %s (default=filter start lines only)" overlays-in "" hide-lines-matching hide-blocks-matching hide-lines-not-matching hide-blocks-not-matching message "No matches found"] 4 (#$ . 14346) "p"]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\210\300\314\315\316\304\305\306\317&\207" [custom-declare-variable syslog-views nil "A list of views.\nIf regexps matching end lines are left blank then lines will be filtered instead of blocks (see `syslog-filter-lines')." :group syslog :type (repeat (list (string :tag "Name") (repeat (cons (string :tag "Base file") (number :tag "Number of previous files/days"))) (choice (const :tag "No file labels" nil) (const :tag "Add file labels" t)) (regexp :tag "Regexp matching start lines of blocks to show") (regexp :tag "Regexp matching end lines of blocks to show") (regexp :tag "Regexp matching start lines of blocks to hide") (regexp :tag "Regexp matching end lines of blocks to hide") (string :tag "Start date") (string :tag "End date") (choice (const :tag "Keep matching dates" nil) (const :tag "Remove matching dates" t)) (repeat (cons (regexp :tag "Regexp to highlight") (face :tag "Face"))) (string :tag "Buffer name"))) syslog-datetime-regexp "^\\(?:[^ :]+: \\)?\\(\\(?:\\(?:[[:alpha:]]\\{3\\}\\)?[[:space:]]*[[:alpha:]]\\{3\\}\\s-+[0-9]+\\s-+[0-9:]+\\)\\|\\(?:[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\s-+[0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\)\\)" "A regular expression matching the date-time at the beginning of each line in the log file.\nIt should contain one non-shy subexpression matching the datetime string." regexp syslog-log-file-directory "/var/log/" "The directory in which log files are stored." directory] 8) #@180 Convert DATE string to time. If no year is present in the date then the current year is used. If DATE can't be parsed then if SAFE is non-nil return nil otherwise throw an error. (defalias 'syslog-date-to-time #[(date &optional safe) "\203!\303 \304\305 \306\307OQ!\211@\310U\205\nA\310U?\205\n)\207\311 \304\305 \306\307OQ!\207" [safe date time safe-date-to-time " " current-time-string -4 nil 0 date-to-time] 7 (#$ . 16723)]) #@217 Restrict buffer to lines between times START and END (Emacs time lists). With prefix ARG: remove lines between dates. If either START or END are nil then treat them as the first/last time in the buffer respectively. (defalias 'syslog-filter-dates #[(start end &optional arg) ";\203 \306!\202\f ;\203\306 !\202 \307\302!\210\310eb\210e\311\f\312\310#\313\211\306\314\315!\310\"!\310 \203y\203U\203U\316 \317 \"\210\312\202e\204e\204e\310\317 \311\f\312\310#\306\314\315!\310\"!\202;\205\202\316 d\".\207" [start end line-move-ignore-invisible start-position syslog-datetime-regexp pos syslog-date-to-time make-local-variable t re-search-forward nil #[(time) "\203 \305 \"\205\n?\206\305 \n\"? \205$\f\203# ?\202$ )\207" [end time start isin arg time-less-p] 3] match-string 1 hide-lines-add-overlay point-at-bol intime-p keeptime dodelete] 5 (#$ . 17165) (let (firstdate lastdate) (save-excursion (goto-char (point-min)) (beginning-of-line) (re-search-forward syslog-datetime-regexp nil t) (setq firstdate (match-string 1)) (goto-char (point-max)) (beginning-of-line) (re-search-backward syslog-datetime-regexp nil t) (setq lastdate (match-string 1))) (list (syslog-date-to-time (read-string "Start date and time: " firstdate nil firstdate)) (syslog-date-to-time (read-string "End date and time: " lastdate nil lastdate)) current-prefix-arg))]) #@62 Major mode for working with system logs. \{syslog-mode-map} (defalias 'syslog-mode #[nil "\304 \210\305\306\307\n!\210\310\311\n\312\313$\210\314\303!\210\315\316 \210\317\320!\210\321\322!\207" [mode-name major-mode syslog-mode-map font-lock-defaults kill-all-local-variables "syslog" syslog-mode use-local-map easy-menu-do-define nil "test" ("Syslog" ["Quit" quit-window :help "Quit and bury this buffer" :key "q"] ["Revert buffer" revert-buffer :help "View the function at point" :key "R"] ["Show all" hide-lines-show-all :help "Show all hidden lines/blocks" :key "g"] ["Filter lines..." syslog-filter-lines :help "Show/hide blocks of text between matching regexps" :key "/"] ["Filter dates..." syslog-filter-dates :help "Show/hide lines between start and end dates" :key "C-/"] ["Kill hidden" hide-lines-kill-hidden :help "Kill (with prefix delete) hidden lines" :key "k"] ["Jump to boot start" syslog-boot-start :help "Jump forward in the log to when the system booted" :key ""] ["Open previous log file" syslog-previous-file :help "Open previous logfile backup" :key "<"] ["Open next log file" syslog-next-file :help "Open next logfile backup" :key ">"] ["Move to previous log file" syslog-move-previous-file :help "Move to previous logfile in buffer" :key ""] ["Move to next log file" syslog-move-next-file :help "Move to next logfile in buffer" :key ""] ["Open log files..." syslog-open-files :help "Insert log files into new buffer" :key "o"] ["Append files..." syslog-append-files :help "Append files into current buffer" :key "a"] ["Prepend files..." syslog-prepend-files :help "Prepend files into current buffer" :key "p"] ["Toggle filenames" syslog-toggle-filenames :help "Toggle display of filenames" :key "t"] ["Find file at point" ffap :help "Find file at point" :key "f"] ["Whois" syslog-whois-reverse-lookup :help "Perform whois lookup on hostname at point" :key "W"] ["Count matches" syslog-count-matches :help "Count strings which match the given pattern" :key "c"] ["Dired" (lambda nil (interactive) (dired syslog-log-file-directory)) :help "Enter logfiles directory" :keys "D"] ["Shell command" syslog-shell-command :help "Execute shell command (as root if prefix arg used)" :key "!"] ["Highlight..." (keymap "Highlight" (regexp menu-item "Regexp" highlight-regexp :help "Highlight each match of regexp" :keys "h r") (phrase menu-item "Phrase" highlight-phrase :help "Highlight each match of phrase" :keys "h p") (lines menu-item "Lines matching regexp" highlight-lines-matching-regexp :help "Highlight lines containing match of regexp" :keys "h l") (unhighlight menu-item "Unhighlight regexp" unhighlight-regexp :help "Remove highlighting" :keys "h u"))] ["Open stored view..." syslog-view :help "Open a stored view of syslog files" :key "v"] ["Edit stored views..." (lambda nil (interactive) (customize-variable 'syslog-views)) :help "Customize `syslog-views'"] ["---" "---"]) make-local-variable (syslog-font-lock-keywords t t nil) buffer-disable-undo toggle-read-only 1 run-hooks syslog-mode-hook] 5 (#$ . 18575) nil]) #@50 Regexp to match the first line of boot sequence. (defvar syslog-boot-start-regexp "unix: SunOS" (#$ . 21652)) #@46 Count strings which match the given pattern. (defalias 'syslog-count-matches #[(regexp) "\301\302\303ed\304$\"\207" [regexp message "%s occurrences" count-matches nil] 7 (#$ . 21768) (list (read-regexp "How many matches for regexp" (symbol-name (symbol-at-point))))]) #@52 Jump forward in the log to when the system booted. (defalias 'syslog-boot-start #[nil "\301d\302#\210\303 \207" [syslog-boot-start-regexp search-forward-regexp t beginning-of-line] 4 (#$ . 22043) nil]) #@225 This is a wrapper around the `whois' command using symbol at point as default search string. Also `whois-server-name' is set to `whois-reverse-lookup-server'. The ARG and SEARCH-STRING arguments are the same as for `whois'. (defalias 'syslog-whois-reverse-lookup #[(arg search-string) "\304\n \")\207" [whois-reverse-lookup-server whois-server-name arg search-string whois] 3 (#$ . 22253) (list current-prefix-arg (let* ((symb (symbol-at-point)) (default (replace-regexp-in-string ":[0-9]+$" "" (symbol-name symb)))) (read-string (if symb (concat "Whois (default " default "): ") "Whois: ") nil nil default)))]) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\311\312\313\314!\203\314\202\315\257C\316\304\305%\210\300\317\320\321\304\305%\210\300\322\323\324\304\305%\210\300\325\326\327\304\305%\210\300\330\331\332\304\305%\210\300\333\334\335\304\305%\210\300\336\337\340\304\305%\210\300\341\342\343\304\305%\207" [custom-declare-face syslog-ip ((t :underline t :slant italic :weight bold)) "Face for IPs" :group syslog syslog-file t :weight bold :inherit facep diredp-file-name dired-ignored "Face for filenames" syslog-hour ((t :weight bold :inherit font-lock-type-face)) "Face for hours" syslog-error ((t :weight bold :foreground "red")) "Face for errors" syslog-warn ((t :weight bold :foreground "goldenrod")) "Face for warnings" syslog-info ((t :weight bold :foreground "deep sky blue")) "Face for info lines" syslog-debug ((t :weight bold :foreground "medium spring green")) "Face for debug lines" syslog-su ((t :weight bold :foreground "firebrick")) "Face for su and sudo" syslog-hide ((t :foreground "black" :background "black")) "Face for hiding text"] 8) #@42 Expressions to hilight in `syslog-mode'. (defvar syslog-font-lock-keywords '(("\"[^\"]*\"" quote font-lock-string-face) ("'[^']*'" quote font-lock-string-face) ("^\\([^ :]+\\): " 1 'syslog-file append) ("\\(?:^\\|[[:space:]]\\)\\([[:digit:]]\\{1,2\\}:[[:digit:]]\\{1,2\\}\\(:[[:digit:]]\\{1,2\\}\\)?\\)\\(?:$\\|[[:space:]]\\)" 1 'syslog-hour append) ("\\(?:^\\|[[:space:]]\\)\\([[:digit:]]\\{1,2\\}/[[:digit:]]\\{1,2\\}/[[:digit:]]\\{2,4\\}\\)\\(?:$\\|[[:space:]]\\)" 1 'syslog-hour append) ("^\\(?:[^ :]+: \\)?\\(\\(?:[[:alpha:]]\\{3\\}\\)?[[:space:]]*[[:alpha:]]\\{3\\}\\s-+[0-9]+\\s-+[0-9:]+\\)" 1 'font-lock-type-face t) ("\\(su:.*$\\)" 1 'syslog-su t) ("\\(sudo:.*$\\)" 1 'syslog-su t) ("\\[[^]]*\\]" quote font-lock-comment-face) ("[[:digit:]]\\{1,3\\}\\.[[:digit:]]\\{1,3\\}\\.[[:digit:]]\\{1,3\\}\\.[[:digit:]]\\{1,3\\}" 0 'syslog-ip append) ("\\<[Ee][Rr][Rr]\\(?:[Oo][Rr][Ss]?\\)?\\>" 0 'syslog-error append) ("\\<[Ii][Nn][Ff][Oo]\\>" 0 'syslog-info append) ("\\<[Cc][Rr][Ii][Tt][Ii][Cc][Aa][Ll]\\>" 0 'syslog-error append) ("STARTUP" 0 'syslog-info append) ("CMD" 0 'syslog-info append) ("\\<[Ww][Aa][Rr][Nn]\\(?:[Ii][Nn][Gg]\\)?\\>" 0 'syslog-warn append) ("\\<[Dd][Ee][Bb][Uu][Gg]\\>" 0 'syslog-debug append) ("(EE)" 0 'syslog-error append) ("(WW)" 0 'syslog-warn append) ("(II)" 0 'syslog-info append) ("(NI)" 0 'syslog-warn append) ("(!!)" 0 'syslog-debug append) ("(--)" 0 'syslog-debug append) ("(\\*\\*)" 0 'syslog-debug append) ("(==)" 0 'syslog-debug append) ("(\\+\\+)" 0 'syslog-debug append)) (#$ . 23946)) #@145 Invoke `syslog-mode' if the buffer appears to be a system logfile. and another mode is not active. This function is added to `find-file-hooks'. (defalias 'syslog-find-file-func #[nil "\302=\205\303 !\205\304 \207" [major-mode syslog-sequence-start-regexp fundamental-mode looking-at syslog-mode] 2 (#$ . 25482)]) #@238 Add a default set of syslog-hooks. These hooks will activate `syslog-mode' when visiting a file which has a syslog-like name (.fasta or .gb) or whose contents looks like syslog. It will also turn enable fontification for `syslog-mode'. (defalias 'syslog-add-hooks #[nil "\300\301\302\"\207" [add-to-list auto-mode-alist ("\\(messages\\(\\.[0-9]\\)?\\|SYSLOG\\)\\'" . syslog-mode)] 3 (#$ . 25807)]) (byte-code "\203\301 \210\302\303!\210\304\305!\207" [syslog-setup-on-load syslog-add-hooks run-hooks syslog-mode-load-hook provide syslog-mode] 2)