Skip to main content
Solved

FME Log "Language" for VS Code


braggken
Supporter
Forum|alt.badge.img+6

Anyone ever developed a VS Code “language” for FME logs files? 
Years ago somone -  I wish I could remember who _ did this for NotePad++ and it was awesome.

The defaul VS Code log view is actually not bad so this is really a - “would be nice”

Best answer by virtualcitymatt

ok well 45 mins of playing around with copilot I was able to put this together……

To install the extension you should just need to run 

code --install-extension path/to/extension.vsix

or drag drop into the list of installed extensions. 
To get the typical blue/red highlighting you also need to add this to your settings.json file
 

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": "markup.inserted.fme-log.warnline",
      "settings": { "foreground": "#0070f3", "fontStyle": "bold" }
    },
    {
      "scope": "markup.deleted.fme-log.errorline",
      "settings": { "foreground": "#e53935", "fontStyle": "bold" }
    }
  ]
}

 After that all my FME Log files now look like this
 

on the left you can see the extension added. I wouldn’t trust what the AI wrote in the description but it does at least uninstall properly.  

 

View original
Did this help you find an answer to your question?

10 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+39

I remember that too - Quick question though, have you tried using copilot to try and make one?


david_r
Celebrity
  • July 1, 2025

I made a quick-and-dirty one for Notepad++ many years ago, although it was not much more than line-based highlighting based on the severity of each message.

I can’t find the definition file anymore, but I remember it was fairly easy to do: https://npp-user-manual.org/docs/user-defined-language-system/


virtualcitymatt
Celebrity
Forum|alt.badge.img+39

ok well 45 mins of playing around with copilot I was able to put this together……

To install the extension you should just need to run 

code --install-extension path/to/extension.vsix

or drag drop into the list of installed extensions. 
To get the typical blue/red highlighting you also need to add this to your settings.json file
 

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": "markup.inserted.fme-log.warnline",
      "settings": { "foreground": "#0070f3", "fontStyle": "bold" }
    },
    {
      "scope": "markup.deleted.fme-log.errorline",
      "settings": { "foreground": "#e53935", "fontStyle": "bold" }
    }
  ]
}

 After that all my FME Log files now look like this
 

on the left you can see the extension added. I wouldn’t trust what the AI wrote in the description but it does at least uninstall properly.  

 


braggken
Supporter
Forum|alt.badge.img+6
  • Author
  • Supporter
  • July 1, 2025

This is a great  ​@virtualcitymatt ! Awesome thanks a lot!


virtualcitymatt
Celebrity
Forum|alt.badge.img+39
braggken wrote:

This is a great  ​@virtualcitymatt ! Awesome thanks a lot!

well don’t thank me - this was 100% vibe coded for free haha


virtualcitymatt
Celebrity
Forum|alt.badge.img+39

ok so I’ve updated it….

It should now highlight sql form the SQL Executer as well as filepaths. You should also now be able to right click on a path and either copy it or open it up in windows explorer.

I’ve also added a feature which is supposed to highlight lines in the log where the time has changed by more than 2 seconds. 

It’s not really well tested at all and I have no idea how well it will perform on really bit log files. 

But I think I’ll be using it. Thanks for the neat idea.

Oh and you need to update the settings.json again to include the following:
 

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": "markup.inserted.fme-log.warnline",
      "settings": { "foreground": "#0070f3", "fontStyle": "bold" }
    },
    {
      "scope": "markup.deleted.fme-log.errorline",
      "settings": { "foreground": "#e53935", "fontStyle": "bold" }
    },
    {
      "scope": "source.sql.embedded.fme-log",
      "settings": { "foreground": "#b58900", "fontStyle": "italic" }
    },
    {
      "scope": "keyword.other.sql",
      "settings": { "foreground": "#268bd2", "fontStyle": "bold" }
    },
    {
      "scope": "constant.other.fme-log.filepath.windows",
      "settings": {
        "foreground": "#FFB74D",
        "fontStyle": "italic"
      }
    },
    {
      "scope": "constant.other.fme-log.filepath.linux",
      "settings": {
        "foreground": "#FFB74D",
        "fontStyle": "italic"
      }
    },
    {
      "scope": "constant.other.fme-log.filepath.url",
      "settings": {
        "foreground": "#FFB74D",
        "fontStyle": "italic"
      }
    }
  ]
}


 


hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Celebrity
  • July 1, 2025

Nothing wrong with a bit of vibe coding! Looks great ​@virtualcitymatt

If you’re taking improvement requests, collapsible sections for Logger messages
 

 


virtualcitymatt
Celebrity
Forum|alt.badge.img+39
hkingsbury wrote:

Nothing wrong with a bit of vibe coding! Looks great ​@virtualcitymatt

If you’re taking improvement requests, collapsible sections for Logger messages
 

 

Nice idea - the AI has now added some collapsible sections.

I’ve also added a command which will extract lines by status.

use CTRL+Shift+P and look for FME Log: Filter Log By Status


braggken
Supporter
Forum|alt.badge.img+6
  • Author
  • Supporter
  • July 2, 2025
virtualcitymatt wrote:
hkingsbury wrote:

Nothing wrong with a bit of vibe coding! Looks great ​@virtualcitymatt

If you’re taking improvement requests, collapsible sections for Logger messages
 

 

Nice idea - the AI has now added some collapsible sections.

I’ve also added a command which will extract lines by status.

use CTRL+Shift+P and look for FME Log: Filter Log By Status

That is so SWEET!


ottadini
Contributor
Forum|alt.badge.img+5
  • Contributor
  • July 7, 2025
virtualcitymatt wrote:
hkingsbury wrote:

Nothing wrong with a bit of vibe coding! Looks great ​@virtualcitymatt

If you’re taking improvement requests, collapsible sections for Logger messages
 

 

Nice idea - the AI has now added some collapsible sections.

I’ve also added a command which will extract lines by status.

use CTRL+Shift+P and look for FME Log: Filter Log By Status

Great stuff!

Could you open source it - stick it on github?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings