Comments (6)
There is no exposed way currently, logview--initialize-submode
is only a part of guessing algorithm.
However, this should not be that difficult to add, e.g C-c C-c
to manually pick a submode from the list of registered ones. However, it still has to somehow guess the timestamp format, unless you specify just one in submode definition. Does your log have an entry starting line somewhere near the beginning, say, in the first 50 lines?
from logview.
Hi Paul,
Thanks for your quick response.
In my log file, the first parse-able message could be 100s of lines from the start of file and it won't be at the same line.
In my sub-mode definition I have ignored the timestamp. The log file is from a simulation so the time doesn't represent real time. I had thought of telling logview that is was UNIX time, but I don't have much need to filter by time as of yet.
Instead of manually picking the sub-mode, could I instead set it based on a file name? The log files always have the same name, so I thought of setting auto-mode-alist based on the file name and a function to tell logview which sub-mode it is.
Thanks!
from logview.
from logview.
Please test if the added command does what you want. You can invoke it with C-c C-c or from Lisp like
(logview-choose-submode "my-submode-name")
assuming you don't use any timestamps.
The command is not yet fully documented.
from logview.
I can confirm that works. Brilliant, thanks very much!
I installed the new version though the Emacs package system (and deleted the old one), but couldn't get it to "reload" the new version so the above function was not recognised. Is there a way to do this without starting an new emacs process?
Cheers.
from logview.
Elisp generally sucks for reloading on-the-fly. You can try visiting logview.el
and manually evaluating all variable declarations with C-M-x
.
from logview.
Related Issues (20)
- Thank you so much for this package HOT 1
- Simple examples of custom formats and setup HOT 7
- Should not add itself to auto-mode-alist HOT 1
- Auto-reverting does not work over Tramp HOT 1
- Add RFC 5424, ie. syslog levels
- Add submode for standard Python logging module HOT 1
- Add submode for Apache logs
- Add submode for PHP's Monolog
- Auto-Revert mode over Tramp freezes Emacs HOT 6
- Epoch Time Support HOT 4
- guess-submode Option to Search Past 1st Line HOT 8
- [Help] Unable to determine the log format HOT 3
- Can't get entries to be matched HOT 2
- modes derived from logview cannot refine font-lock HOT 9
- Color surrounding portions of log lines HOT 8
- Awesome mode! HOT 1
- [Help] How to write format for thread name which do not have starter and terminator? HOT 7
- Timezone in timestamp HOT 2
- Support Android's Logcat HOT 6
- Is there a way to contribute non-standard submodes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logview.