The message log is a text file that is located in the temporary user directory:
>cd %USERPROFILE%\AppData\Local\Temp
The format of the file name and the filter settings which messages are to be output are controlled via the application configuration file (App.config or * .exe.config in the bin directory):
In step 1 (see above), the iPlus configuration class LoggingConfiguration from the namespace "gip.core.autocomponent" must be announced using <sectionGroup> and <section> .
In step 2, then the classes LoggingConfiguration, LogFileElement, LoggingTypeElement can be used.
The list <LoggingTypes> contains Entries of type "gip.core.autocomponent.LoggingTypeElement" which are added by the <addLoggingType>-Element. This class is used to describe which messages, that occur using IMessages, should be filtered and not output. With each entry a new "log file type" is defined which must be given a unique name in the "FileType" attribute.
The entries in the <LogFiles> list that are added via <addLogFile> then refer to this "log file type". The entries are of the type "gip.core.autocomponent. LogFileElement". This declares which log files are written with which file name.
LoggingTypeElement (Section <addLoggingType>):
Name | description |
---|
string FileType | Unique name of the "log file type". |
---|
string MessageType | Filter that specifies what type of messages should be considered. The possible values are defined in the "gip.core.datamodel.eMsgLevel" enum: Default, Debug, Info, Warning, Failure, Error, Exception, Question. With "Default" no messages are filtered and all are output. |
---|
string Source | Filter (ACUrl) that specifies from which ACComponent instance messages are to be output. With "*" all instances are taken into account. |
---|
string ACName | Additional filter that only takes into account messages for which the property gip.core.datamodel.Msg.ACIdentifier matches. The ACIdentifier is any string that can be assigned by the programmer. It is primarily used to find the correct code in the program code. It is advisable to specify the method name with a unique code number, eg. "Start(50)". |
---|
bool DumpThreadID | If "True", then the ThreadID is written in the log lines. |
---|
string Smtp | Connection parameters to send messages via SMTP. Parameters are declared separated by semicolons: SmtpServerHost=localhost; SmtpServerPort=25; SmtpUseSSL=false; IgnoreInvalidCertificate=true; SmtpAuthUser=iPlus; SmtpAuthPassword=iPlusPW; SmtpFrom=iPlus@localdomain.com; SmtpReceipients=rcp1@localdomain.com,rcp2@localdomain.com; The System.Net.Mail.SmtpClient class is used for sending. |
---|
LogFileElement (section <addLogFile>):
Name | description |
---|
string FileType | Reference to the log file type defined in the <addLoggingType> section. |
---|
string FileName | File name of the log file. With placeholder %Date% the current day is inserted in the format "YYYYMMDD". %ProcessId% inserts the process ID. |
---|
int MaxSizeMB | Maximum file size in MB. |
---|
int ArchiveAfterDays | If the value is> 0, log files that are older than the specified value are added to a ZIP archive. |
---|