Glogg prevents renaming the files

199 views
Skip to first unread message

mcvet...@gmail.com

unread,
Oct 18, 2016, 5:57:13 AM10/18/16
to glogg
I have a log file open in glogg v1.1.1. Log file is created with NLog and with archiving settings that should occasionally move the file and create a new one. But glogg prevents that, because it locks the file. Glogg prevents any kind of moving the file, for instance renaming the file in Explorer. I do need to move the file while glogg is open though. This is written in internal NLog log file:

2016-10-19 11:24:50.2737 Info Archiving <path to log file> to <path to archived log file>
2016-10-19 11:24:50.2737 Error Error has been raised. Exception: System.IO.IOException: The process cannot access the file because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at NLog.Targets.FileTarget.ArchiveFile(String fileName, String archiveFileName)
   at NLog.Targets.FileTarget.TryArchiveFile(String fileName, LogEventInfo ev, Int32 upcomingWriteSize)
   at NLog.Targets.FileTarget.ProcessLogEvent(LogEventInfo logEvent, String fileName, Byte[] bytesToWrite)
   at NLog.Targets.Target.Write(AsyncLogEventInfo logEvent)

That "another process" is glogg, because the rolling works if glogg is closed. To test just try to rename the file while it's open in glogg.

austin...@gmail.com

unread,
Nov 3, 2016, 9:32:26 AM11/3/16
to glogg, mcvet...@gmail.com
This is a problem for me as well when using glogg. I use it because it's far faster than BareTail, but I have to be careful to either point it to a copy of a log or to remember to close glogg before the log I'm looking at rolls over.

bdw...@gmail.com

unread,
Jun 9, 2017, 11:37:54 AM6/9/17
to glogg, mcvet...@gmail.com
I also have this issue. It would be great to have it fixed so I can leave glogg running instead of having to remember to stop it.


On Tuesday, October 18, 2016 at 5:57:13 AM UTC-4, mcvet...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages