Rotating file names

Notes, tips, and other usefull things on how to use LogMX

Moderator: admin

Post Reply
bedge
Posts: 10
Joined: Sun Aug 24, 2014 2:11 am

Rotating file names

Post by bedge »

We have one app, jetty, that uses rotating log file names. eg:

2014_08_19.stderrout.log.214703010
2014_08_19.stderrout.log.215054588
2014_08_19.stderrout.log.223847154
2014_08_19.stderrout.log.223940286
2014_08_19.stderrout.log.224025914
2014_08_19.stderrout.log

The latest one is <date>.stderrout.log, so a tail should follow this name across date rollovers. Is this possible with LogMX?

Additionally, if the app is restarted, the previous log is renamed to <date>.stderrout.log.<numeric sequentail value>.
Is it possible to have LogMX merge all of these so that one can scroll back into earlier log files and view the aggregated collection of logs together?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: Rotating file names

Post by admin »

Hello,

Yes, LogMX can do that, using the "Local directory manager": you simply have to specify the directory, and the file pattern "*.stderrout.log.*", and then a merged view of all files will be displayed (with optional auto-refresh/monitoring on this merged view).

To use this "Local directory manager", go to "File" > "Open", and select the Manager "Local directory manager" at the top of the window.

Please let us know if you have trouble using this feature.

Xavier
bedge
Posts: 10
Joined: Sun Aug 24, 2014 2:11 am

Re: Rotating file names

Post by bedge »

This doesn't work with remote file systems?

I get an I/O exception when trying this using the sftp directory manager. Screenshot attached.

(I am unable to copy text from any of the dialogs thrown up by logmx. This is running on osx. Hence the screenshot rather than a text dump)
Screen Shot 2014-08-29 at 10.06.49 AM.png
Screen Shot 2014-08-29 at 10.06.49 AM.png (51.59 KiB) Viewed 11034 times
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: Rotating file names

Post by admin »

Hello,

Indeed, there's no SFTP directory manager at this time (yet, it is already on our roadmap), using "*" in SFTP URL is not handled at this time.
I will let you know when it's available by posting a message in this thread.

In the meantime, maybe you could start LogMX on the host that holds these files, to use the Local directory Manager.

Xavier
bedge
Posts: 10
Joined: Sun Aug 24, 2014 2:11 am

Re: Rotating file names

Post by bedge »

All our remote nodes are headless, so running logmx locally is not an option.

I look forward to the SFTP dir manager. Is there any time frame for this?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: Rotating file names

Post by admin »

I understand your situation.

We are currently working on v5.2.0 which supports compressed (ZIP/GZIP) logs, and logs received on TCP/UDP sockets. Once this version is released (in one or two weeks), we will work on SFTP directory Manager. In fact, we will work on a more "generic" solution where each Manager could provide "browser" capabilities, so that it could also be applied to other Managers... (i.e. some Managers could be "directory" aware, like SFTP, FTP, and user-defined Managers). You can expect it to be released in October. I will let you know when it'd available by posting a message here.

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

Re: Rotating file names

Post by admin »

Hello,

LogMX v5.2.1 is now released and includes (among many other things) the SFTP directory Manager you needed.
To use it, simply go to "File", "Open", and choose the "SFTP directory Manager", or you can directly enter URLs like "sftp-dir://login@host//path/to/dir?f=*.log".

PS: LogMX now also includes FTP/FTPS directory Managers.

Xavier
Post Reply