Re: log viewer in emacs
Christian Plate <[email protected]>
| Newsgroups | gmane.emacs.jdee |
|---|---|
| Message-ID | <[email protected]> |
Hi, > Is there a way to use emacs as a log viewer. Ie, view the log files in execution > time. It also would be good, if i could use colors in the lines. Load the log file, then do "M-x auto-revert-tail-mode" ,----[ C-h f auto-revert-tail-mode RET ] | auto-revert-tail-mode is an interactive autoloaded Lisp function in `autorevert'. | (auto-revert-tail-mode &optional arg) | | Toggle reverting tail of buffer when file on disk grows. | With arg, turn Tail mode on iff arg is positive. | | When Tail mode is enabled, the tail of the file is constantly | followed, as with the shell command `tail -f'. This means that | whenever the file grows on disk (presumably because some | background process is appending to it from time to time), this is | reflected in the current buffer. | | You can edit the buffer and turn this mode off and on again as | you please. But make sure the background process has stopped | writing before you save the file! | | Use `auto-revert-mode' for changes other than appends! | | [back] `---- If you want to highlight specific things in the log, use hi-lock-mode. You can highlight regexes with hi-lock-face-phrase-buffer: ,----[ C-h f hi-lock-face-phrase-buffer RET ] | hi-lock-face-phrase-buffer is an interactive compiled Lisp function in `hi-lock.el'. | (hi-lock-face-phrase-buffer regexp &optional face) | | Set face of each match of phrase regexp to face. | | Whitespace in regexp converted to arbitrary whitespace and initial | lower-case letters made case insensitive. | | [back] `---- I hope this helps. Christian