Export / Import Workspaces

Any other thing not listed below...

Moderator: admin

Post Reply
mwoods
Posts: 5
Joined: Tue Jan 13, 2015 4:46 pm

Export / Import Workspaces

Post by mwoods » Tue Jan 13, 2015 4:49 pm

Does LogMX have the ability to export/import a workspace? It would be extremely useful for teams that support multiple applications in multiple environments.

admin
Site Admin
Posts: 421
Joined: Sun Dec 17, 2006 10:30 pm

Re: Export / Import Workspaces

Post by admin » Tue Jan 13, 2015 5:23 pm

Hello,

Yet, it is possible: in "Workspaces" dialog (menu "File" > "Workspaces"), using the small buttons at the bottom left-hand corner:
Image
The one at the left exports workspaces, and the one at the right import them.

Feel free to post here if you have trouble using these features.

Xavier

mwoods
Posts: 5
Joined: Tue Jan 13, 2015 4:46 pm

Re: Export / Import Workspaces

Post by mwoods » Wed Jan 14, 2015 3:11 pm

Thank you for the fast response. I was really hoping that the export files would be in plain text so that we can generate the files with custom scripts. In our case, we need to support 30+ applications in 4 environments that each have 4-6 servers. That comes to about 120 workspaces and 400+ log files and a lot of mouse clicks in the UI.

Are there any conversion utilities that that can take in a text or xml file and convert it to the format expected by LogMX?

Thanks,

admin
Site Admin
Posts: 421
Joined: Sun Dec 17, 2006 10:30 pm

Re: Export / Import Workspaces

Post by admin » Wed Jan 14, 2015 5:40 pm

In fact, all options exported by LogMX are exported as a ZIP file (because some options require several files to be exported). So you simply have to rename the exported file from "<your_file>.export" to "<your_file>.zip" to open it: there's only one, plain-text, file in this ZIP, so generating it with some script and packaging it in a ZIP should be easy. The syntax used in this plain-text file is JSON. Depending on what kind of workspace element you want to describe in your workspaces (e.g. a bookmark, a URL, or a directory), you will have to use some specific JSON field names. So I advice you to create the first bookmarks, URLs, or directories using LogMX, export the workspaces, and see which JSON fields are used. For example, here is the JSON lines for a bookmark stored in a workspace called "Workspace1":

Code: Select all

      {
        "u": "C:\\Users\\john\\Documents\\app.log",
        "t": 0,
        "n": "My bookmark",
        "o": {
          "tm": false,
          "e": {
            "e": "null",
            "s": null,
            "et": "DEFAULT_ENCODING"
          },
          "ts": null,
          "a": []
        }
      }
    ],
    "n": "Workspace1"
For example, for Bookmarks:
  • "u" means "URL"
  • "t" means "workspace element type"
  • "n" means "name"
  • "a" means "alerts"
  • "e" means "encoding"
Please let me know if you need more help to generate your workspaces (for example, mind the JSON escape characters like "\\" for "\", see http://stackoverflow.com/questions/3020 ... gs-in-json for example)

Xavier

mwoods
Posts: 5
Joined: Tue Jan 13, 2015 4:46 pm

Re: Export / Import Workspaces

Post by mwoods » Wed Jan 14, 2015 7:47 pm

This is exactly what I was hoping for. Thank you!

mwoods
Posts: 5
Joined: Tue Jan 13, 2015 4:46 pm

Re: Export / Import Workspaces

Post by mwoods » Thu Jan 15, 2015 3:10 pm

I was able to generate a JSON file that contains all of the desired workspaces and get it to import into LogMX. Now I'm looking for a easy way to remove all of the workspaces from the application so that we can re-import with a different sort order. I don't see any files in the C:\Program Files\LogMX folder that gets updated when I import workspaces. Are they stored in the registry?

admin
Site Admin
Posts: 421
Joined: Sun Dec 17, 2006 10:30 pm

Re: Export / Import Workspaces

Post by admin » Thu Jan 15, 2015 5:21 pm

By default, all LogMX options are saved in a single text file: "<LogMX_install_directory>/config/logmx.properties".
If you want to remove all workspaces by editing the configuration file (I understand it might be very long in GUI if you have hundreds of workspaces...), you first have to close LogMX, then edit the line starting with:

Code: Select all

workspaces=.......
to remove all the stuff just after "workspaces=". Then you can finally start LogMX.

mwoods
Posts: 5
Joined: Tue Jan 13, 2015 4:46 pm

Re: Export / Import Workspaces

Post by mwoods » Mon Jan 26, 2015 7:24 pm

That is exactly what I needed. Thank you!

Feature Request:
Now that I have these hundreds of workspaces, it would be awesome if there was a flag to make the tree nodes collapse by default.

admin
Site Admin
Posts: 421
Joined: Sun Dec 17, 2006 10:30 pm

Re: Export / Import Workspaces

Post by admin » Tue Jan 27, 2015 4:42 pm

OK, good idea. We will add collapse/expand options to the tree (e.g. options in a menu displayed by a right-click). We may also add the support of multiple-selection, so that you can delete several workspaces or workspace elements at the same time :wink:
I will let you know when these features are available.

Thanks for sharing your ideas!

admin
Site Admin
Posts: 421
Joined: Sun Dec 17, 2006 10:30 pm

Re: Export / Import Workspaces

Post by admin » Mon Feb 16, 2015 9:19 pm

Hello,

LogMX v5.3.2 is now released, and includes (among many other things) some improvements for "Workspaces" dialog:
  • you can now expand/collapse the whole tree using a right-click on the tree,
  • LogMX now automatically collapses the tree by default when dialog opens if there are more than 30 elements (visibility improved),
  • you can now select multiple tree elements to open/remove all of them at the same time
Xavier

Post Reply