Community
    • Login

    UDL for Log files

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 3 Posters 892 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Pierre de la VerreP Offline
      Pierre de la Verre
      last edited by

      I try to define a UDL for some kind of LOG-files. So it should be rather simple, no bracket intention and all that stuff

      Nevertheless I have some questions:

      a)
      It highlights number only when the are alone “1” or “123.45”. But it does not mark them when they are side by side with other characters: “1+2=3”, “version21”
      How to highlight every number?

      b)
      How to highlight strings as parts of other strings, like “check”: in “upCHECKer” or “CHECKed” or “NumberCHECKing”

      c)
      I used (tried to use) quotes with German Umlaute, like “grosse Mühle” or “ärgerlicher Fehler”. It seems that these words are only accepted without quotes - correct?

      d)
      Final blanks are not accepted with quotes. “Where are Joe and” works fine. "Where are Joe and " are not accepted as multipart keyword. Correct?

      Thanks and regards!

      dinkumoilD 1 Reply Last reply Reply Quote 0
      • dinkumoilD Offline
        dinkumoil @Pierre de la Verre
        last edited by dinkumoil

        @Pierre-de-la-Verre

        FYI: In Notepad++ UDL configurator unfortunately doesn’t support regular expressions though this would help in a lot of cases like yours. But you could try the Analyse Plugin (availabel via built-in Plugins Admin). It has been especially developed for analysing log files and supports regular expressions. Could be a better approach for you than fiddling around with UDL configuration.

        1 Reply Last reply Reply Quote 2
        • Pierre de la VerreP Offline
          Pierre de la Verre
          last edited by

          @dinkumoil

          thanks. It’s an interessting feature, but in my special case a highlighting seem to be better.

          EkopalypseE 1 Reply Last reply Reply Quote 0
          • EkopalypseE Offline
            Ekopalypse @Pierre de la Verre
            last edited by Ekopalypse

            @Pierre-de-la-Verre

            UDL has been designed to support highlighting of programming languages, your use case is a little bit different to this.
            At the moment I see 3 ways to make this work.

            1. You write your own lexer
            2. You use a scripting plugin and enhance the already defined UDL with the missing features.
            3. By using a slightly different approach like the one mentioned by dinkumoil.

            When you want to make either 1 or 2 work, there is, for example, the PythonScript plugin which has a logfile lexer as an example script.
            In addition, I described here how one can enhance an already defined UDL with pythpn and regex.

            1 Reply Last reply Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors