Important: if logging is enabled, and you never purge the log file, a system disk may get overfilled!
Enable logging to main and auxiliary files and event log In the Appsettings.xml file on the GN4 server (where?), specify the log file name, the folder as a valid path, enable log splitting each day, enable logging of Errors only and enable Event viewer, e.g.: <add key="Db.LogFileName" value="GN4" /> <add key="Db.LogDir" value="C:\Tera\GN4" /> <add key="Db.LogSplit" value="1d" /> <add key="Db.LogEvents" value="Errors" /> <add key="Db.EventViewer" value="true"/> You can add more items to Db.LogEvents, e.g. <add key="Db.LogEvents" value="Errors,Exalead" /> See Configuring main and auxiliary logging for the list of available keywords. Enable log for Web interface system exceptions In the Web.Config file, make sure that log is enabled similar as below: <elmah> <security allowRemoteAccess="0" /> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" /> </elmah> For further info about Web interface system exceptions, see Logging of system exceptions for Web interface. |
Disable logging to main and auxiliary files and event log In the Appsettings.xml file on the GN4 server, specify the log file name as an empty string: <add key="Db.LogFileName" value="" /> <add key="Db.EventViewer" value="false"/> Disable only the main log file To disable the main log file, keeping the auxiliary files creation: ▪specify the LogFileName key with the path where you want to store the auxiliary files. For example: <add key="Db.LogFileName" value="c:\temp\" /> The main log file is not created at all. ▪Specify the LogEvents key without any event logged in the main log file (that is without Sql and Login). For example: <add key="Db.LogEvents" value="Errors" /> to log the XML resulting from a wrong XSL tranformation in the auxiliary log files. Disable log for Web interface system exceptions In the Web.Config file, comment out the entire <elmah> section: <!--<elmah> <security allowRemoteAccess="0" /> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" /> </elmah>--> For further info about Web interface system exceptions, see Logging of system exceptions for Web interface. |
See Logging GN4 system exceptions in a local file See also Auto-reporting of GN4 system exceptions via e-mail. |