Giter VIP home page Giter VIP logo

Comments (7)

doublep avatar doublep commented on May 30, 2024 1

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.

dmg46664 avatar dmg46664 commented on May 30, 2024

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.

dmg46664 avatar dmg46664 commented on May 30, 2024

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.

doublep avatar doublep commented on May 30, 2024

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.

Apteryks avatar Apteryks commented on May 30, 2024

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.

Apteryks avatar Apteryks commented on May 30, 2024

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.

Apteryks avatar Apteryks commented on May 30, 2024

I see, thank you for explaining; it seems reasonable.

from logview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.