GUI should offer option to disable logging (+ disable locking of logfile)

Description

GS opens always at start a logfile and locks it.
This causes problem during backup of system.

Even when changing xml logfile settings the logfile is opened and locked.
Fiddling with XML settings is bad.

GS GUI should offer an option to completely disable logging

At least it should only open logfile when it want to write something and the release the lock.

Environment

None

Activity

Show:
Robin Krom
December 11, 2013, 6:53 PM

Hi,

can you explain why?

Best wishes,
Robin

Jens Klingen
April 6, 2018, 4:45 PM

This seems to be the same as this recent discussion on sourceforge, I assume we can close this one now, but for the sake of completeness:

In the meantime, we have added an FAQ entry about how logging can be deactivated.

If you don't want the log file to be locked, you can configure log4net (the logging framework we are using for Greenshot) to use minimal locking, i.e. file is locked only when a log is actually written. Please keep in mind that this setting can affect performance in case you turn on logging again, which is why this is not the default behavior.

You can activate minimal locking by adding a single line to log4net.xml:

<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />

See the log4net config examples for a full example.

Best regards,
Jens

Assignee

Unassigned

Reporter

Thomas

Affects versions

None

Components

None

Priority

Labels

None
Configure