Skip to content

Commit

Permalink
- define logging config to prevent default logging which is creating …
Browse files Browse the repository at this point in the history
…large log files
  • Loading branch information
david-cox-sciex committed Jan 3, 2025
1 parent 70f1193 commit 05e7850
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pwiz/data/vendor_readers/ABI/Reader_ABI_Test.exe.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,29 @@
<supportedRuntime version="2.0" />
<supportedRuntime version="4.0" />
</startup>

<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>

<log4net>
<appender name="SciexLogAppender" type="OFX.Logging.Log4Net.Async.AsyncRollingFileAppender, OFX.Logging">
<file value="C:\ProgramData\SCIEX\Logs\Reader_ABI_Test.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<preserveLogFileNameExtension value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="--- log started ---" />
<param name="Footer" value="--- log stopped ---" />
<conversionPattern value="[%date{dd-MM-yyyy HH:mm:ss,fff}] %thread [%-5level] %logger{2} - %message%newline" />
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="SciexLogAppender" />
</root>
</log4net>
</configuration>
22 changes: 22 additions & 0 deletions pwiz_tools/MSConvertGUI/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="MSConvertGUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>

<runtime>
Expand All @@ -23,4 +24,25 @@
</setting>
</MSConvertGUI.Properties.Settings>
</userSettings>

<log4net>
<appender name="SciexLogAppender" type="OFX.Logging.Log4Net.Async.AsyncRollingFileAppender, OFX.Logging">
<file value="C:\ProgramData\SCIEX\Logs\MSConvertGUI.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<preserveLogFileNameExtension value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="--- log started ---" />
<param name="Footer" value="--- log stopped ---" />
<conversionPattern value="[%date{dd-MM-yyyy HH:mm:ss,fff}] %thread [%-5level] %logger{2} - %message%newline" />
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="SciexLogAppender" />
</root>
</log4net>
</configuration>

0 comments on commit 05e7850

Please sign in to comment.