Comments (7)
It's basically always (KEY . VALUE)
. When it is a list, you can write it either as (KEY . (ELEMENT1 ELEMENT2...))
or as (KEY ELEMENT1 ELEMENT2...)
, just Lisp working that way.
from logview.
I needed to obfuscate an example before pasting:
INFO, com.test.TestClass, "2019.03.29 04:39:11.227", pool-2-thread-11, "[SYSTEM] [] Setting up parameters for Blah"
from logview.
I've just realized I have an added complication of thread field potentially looking like Something.meaningfulPresumablyANameToTheThreadGivenByTheApp [0000000002] # pool-2-thread-5
or just pool-2-thread-5
if not available. :-(
That was actually on the first line for me.
from logview.
Having a couple of copy & paste example custom configurations would be useful
I'm generally following the idea that users should use customization interface rather than Lisp code. Try M-x customize-group RET logview RET
.
Does [ need escaping? (I think not given your default format).
No.
Does it need to be an exact match on whitespacing and surrounding characters?
Presumably commas are allowable
Any whitespace in the pattern matches any whitespace in the actual line, but other characters have to be precisely as in the pattern.
Why does it need to understand the timezone? (See below)
Since recent versions there are commands like z A
that need to understand how far apart two timestamps are. To do that correctly, timezone is needed (because of daytime-saving etc.).
However it's not working (and the dangling double quote isn't a mistake), but it may also be due to the following:
datetime--determine-system-timezone: Failed to determine system timezone; consider customizing ‘datetime-timezone’ variable
datetime
library fails to find the correct timezone for your system. As it says, consider customizing datetime-timezone
variable
It doesn't guess my format correctly
I guess only because of the above error. If you tell datetime
your system timezone, it should be able to guess (I hope).
I imagine this is an Emacs for Windows issue?
Rather datetime
on Windows, but yes.
I've just realized I have an added complication of thread field potentially looking like Something.meaningfulPresumablyANameToTheThreadGivenByTheApp [0000000002] # pool-2-thread-5 or just pool-2-thread-5 if not available. :-(
I'm not sure I understand what you mean, but Logview should handle one set of matching parens ((
+ )
or [
+ ]
) in the names. Not more than one though.
from logview.
Hello!
I also struggled a lot with specifying a submode for RobotFramework debugfile logs; I was getting difficult to understand errors. In the end, what worked was this:
(setq logview-additional-level-mappings
'(("RobotFramework"
(error "FAIL")
(warning "WARNING")
(information "INFO" "HTML")
(debug "DEBUG")
(trace "TRACE")
(aliases "RF" "Robot")))
logview-additional-timestamp-formats
'(("RobotFramework"
(java-pattern . "yyyyMMdd HH:mm:ss.SSS")
(datetime-options :any-decimal-separator t)
(aliases "Robot" "RF")))
logview-additional-submodes
'(("RobotFramework"
(format . "TIMESTAMP - LEVEL - MESSAGE")
(levels . "RobotFramework")
(timestamp "RobotFramework")
(aliases "RF" "Robot"))))
A couple of observations: sometimes the items of an alist must be pairs, sometimes proper lists, for example the format
vs timestamp
key in the above additional submodes definition. It'd be nice if everything was consistently using either.
from logview.
The fact that the default timestamp formats are dynamically made made it harder than it should have been to specify one. Granted, I've now learned how to uso customize-group
, which helped, but still, Elisp-formatted examples would be useful, I think.
from logview.
I see, thank you for explaining; it seems reasonable.
from logview.
Related Issues (20)
- Syntax highlighting -- conflicts with whitespace-mode when buffer text is updated in any way HOT 5
- Selecting an alias submode does not work
- Support closer-to-ISO-8601 format for timestamps HOT 4
- Commands Not Assigned In read-only-mode HOT 4
- Thank you so much for this package HOT 1
- 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
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.