Find lines without "client"

Dennis Drejer's Avatar

Dennis Drejer

21 Sep, 2017 09:25 AM

Hi

Can I somehow search for alle lines in the log that does not contain the word "client"

  1. Support Staff 1 Posted by potsky on 21 Sep, 2017 09:45 AM

    potsky's Avatar

    Use this PCRE search :

    @^((?!client).)*$@
    
  2. potsky closed this discussion on 21 Sep, 2017 09:45 AM.

  3. Dennis Drejer re-opened this discussion on 21 Sep, 2017 10:31 AM

  4. 2 Posted by Dennis Drejer on 21 Sep, 2017 10:31 AM

    Dennis Drejer's Avatar

    I does not work on my installation. I can see that I have lines without client in it, but it does not find anything at all.

  5. Support Staff 3 Posted by potsky on 21 Sep, 2017 12:50 PM

    potsky's Avatar

    Have you tried this @^((?!contact).)*$@ for example on demo.pimpmylog.com ? Does it remove all contact pages for example with your browser ?

    Do you use last version 1.7.14 ?

    Can you send more details about your logs, your server OS, etc... You can make this conversation private on right if you send confidential informations...

  6. 4 Posted by Mathias Anderse... on 22 Sep, 2017 07:15 AM

    Mathias Andersen's Avatar

    Hello, I am a colleague of Dennis. We are indeed using 1.7.14, we are running CentOS, and here is a samlpe of some of the logs we wanna hide: https://i.imgur.com/cWj8Ben.png

  7. Support Staff 5 Posted by potsky on 22 Sep, 2017 07:36 AM

    potsky's Avatar

    Hello Mathias,

    I don't know why the regex search does not work in your browser.

    When seeing your screenshot, I presume you want to always remove these logs from the display, correct ? If this is the case, you should modify the configuration file and add something like this :

    "exclude": {"Log" : ["client denied by server configuration"] }
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac