glogg | Refresh not working

304 views
Skip to first unread message

Gerald Sagmeister

unread,
Feb 18, 2016, 11:37:55 AM2/18/16
to glogg...@googlegroups.com

Hi there,

First of all great log editor, could become my favourite, but there is one thing that is not working in my environment.

It doesn’t really follow the file, if i click „Follow File“ it jumps to the end but doesnt display the new lines.

If I press „Refresh“ new lines are there.

I also played around with Advanced -> Enable polling, which had no effect.

 

My environment:

Win 2012 R2 Server

Logfile is kept open by the writing process all the time

 

Here u can see it compared to another editor, same log at the same time, new lines are missing.

If I refresh, then its fine

 

mit freundlichen Grüßen | kind regards

 

DI (FH) Gerald Sagmeister

Head of Engineering

----------------------------------------------------
UNICOPE GmbH | Wien

Heiligenstädter Lände 27c

A-1190 Wien

T +43 5 06216-5220  

F +43 5 06216-9220

M +43 664 35 77 022

E gerald.s...@unicope.com

----------------------------------------------------
Zentrale | UNICOPE GmbH

Pfongauer Straße 67

A-5202 Neumarkt am Wallersee

----------------------------------------------------
UID: ATU64785735 | Sitz: Neumarkt a. W.

FN 322728a | Landesgericht Salzburg

DVR: 4013966

----------------------------------------------------

 

roland.s...@gmail.com

unread,
Feb 24, 2016, 7:33:27 AM2/24/16
to glogg, Gerald.S...@unicope.com
Hi Gerald,

Same problem here. I use glogg to show logfiles created by a Java application using Log4J.
I discovered, that, even after new log entries are written, the modification time of the logfile did not change.

If I manually added some entries using a text editor, the modification time of the logfile was updated and
also immediately displayed by glogg!

I suppose, glogg looks at the modification time of the observed file and, if  it does not change, glogg
will not update its view.

regards

Roland

navig...@gmail.com

unread,
Feb 26, 2016, 4:34:05 AM2/26/16
to glogg, Gerald.S...@unicope.com, roland.s...@gmail.com
Hi, same here.

Using a file on local disk definitely currently being filled by another process, glogg just sits there and doesn't see the changes, only after hitting 'refresh'. I didn't verify your observation regarding file modification time though.


Wayne Taylor

unread,
Dec 2, 2016, 8:40:14 AM12/2/16
to glogg, Gerald.S...@unicope.com
I have had this same problem since before 2014. It seems that windows support is trivial and of no interest. A log viewer should be able to follow or it is virtually no different from Notepad.

roland.s...@gmail.com

unread,
Dec 7, 2016, 6:00:44 AM12/7/16
to glogg, Gerald.S...@unicope.com
Hi glogg users,

As we use our own log4j appenders here (RollingThreadingZipFileAppender, which zips the rolled log files),
I was able to solve the problem by updating the file modification date on every append.
The code of the RollingZipFileAppender looks like this:

public class RollingThreadingZipFileAppender extends RollingFileAppender {
  :
  :
    @Override
    public void append(LoggingEvent event) {
        super.append(event);
        updateModificationTime();
    }

    /**
     * Updates the log file modification timestamp.
     * Some log file viewers (e.g. glogg) relies on the file modification date to detect
     * file changes.
     */
    private void updateModificationTime() {
        if (logFile == null)
            logFile = new File(fileName);
        logFile.setLastModified(System.currentTimeMillis());
    }
}

Hope this helps.
Updating the file modification time keeps glogg up-to date with new records in the log file.
Another annoying problem (at least on Windows OS) is, that the files are locked by glogg, so they can not be deleted while glogg is open (no problem with baretail for example).
Reply all
Reply to author
Forward
0 new messages