Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensive logfile creation #830

Closed
larsen0815 opened this issue Apr 12, 2021 · 3 comments
Closed

Extensive logfile creation #830

larsen0815 opened this issue Apr 12, 2021 · 3 comments
Assignees
Milestone

Comments

@larsen0815
Copy link

Each time I start SuperPutty, there is a new logfile created in %temp%. Over
time, this leads to unnecessary consumption of disk space which indeed is a
problem with small SSDs (also, this just shouldn´t happen).

SuperPutty 1.4.0.9
Win 10, 20H2

I couldn´t find an option to configure this. Would be good if logs were
disabled by default and could be enabled via the option menu.

Or simply overwrite the old log on each restart. Or only use one logfile mor multiple starts and restrict it to only ~1 MB.

Related to Issue #472

@jimradford
Copy link
Owner

You can disable (or reconfigure) logging by editing the SuperPutty.exe.config file located in the installation folder of SuperPutty. Configuration. There should be a section that looks something like:

   <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file type="log4net.Util.PatternString" value="${TEMP}/SuperPuTTY.%date{yyyyMMdd_HHmmss}.log"/>
      <!-- <file value="${TEMP}/SuperPuTTY.log"/> -->
      <appendToFile value="true"/>
      <rollingStyle value="Size"/>
      <maxSizeRollBackups value="10"/>
      <maximumFileSize value="1000KB"/>
      <staticLogFileName value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
      </layout>
    </appender>

You can remove that section to completely disable logging to a file, or better yet it appears you can change these two line to look like this:

<!-- <file type="log4net.Util.PatternString" value="${TEMP}/SuperPuTTY.%date{yyyyMMdd_HHmmss}.log"/> -->
 <file value="${TEMP}/SuperPuTTY.log"/>

And it should do the rolling logs as configured in the file. I'm going to also change this to the default for future releases as it seems more sane for those that really don't care about logfiles. 

@jimradford
Copy link
Owner

I've also added this information to the Wiki to make it more readily findable. Let me know if further assistance is required.

@jimradford jimradford self-assigned this Nov 21, 2021
@jimradford jimradford added this to the v1.4.10 milestone Nov 21, 2021
@larsen0815
Copy link
Author

Thanks, this worked (just make sure to edit the file with admin privileges)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants