Logging

Logging in Vertec

Vertec Logging tracks information and error messages of all operations in and around Vertec (Vertec apps, Vertec Addins, and Cloud Server). Each log information is assigned to a level.

Log Levels:
  • 10: Debugging
  • 20: Info
  • 30: Warning
  • 40: Error
  • 50: Fatal

All information from level 20 is tracked by default. Log entries with level 10 (debug) are only written if they are explicitly enabled. For this purpose, there are so-called DebugCategories, which are set in the Log section in the vertec.ini file.

Vertec creates various log files for this purpose, in which the various processes are listed. The following log files are available:

Log files of apps and add-ins

If no LogFileFolder is specified in the Log section of the Vertec.ini file, these logfiles are created per client under User\AppData\Roaming\Vertec. An easy way to access this folder directly is by using the %appdata% command.

  • Type %appdata% directly into the address bar of Windows Explorer, or
  • Click Start > Run (or Windows+R) and type %appdata%

This will open the folder Application data folder of the logged-in user. The log files will be placed in a subfolder named after the folder in which the corresponding application is located. If the applications are located in the folder C:\Program Files\Vertec, the log files will be located in %appdata%\Vertec.

Logfile Logging Overridden at program start
Vertec.Desktop.log Operations in the Desktop App and LDAP Authentication No
Vertec.Cloud.log (Local) Operations in the Cloud App No
VertecExceptions.log Exceptions with Stack Trace (as with detailed error messages) No
WordAddin.log Tasks in the Word add-in Yes
ExcelAddin.log Tasks in the Excel add-in Yes
OutlookAddin.log Tasks in Outlook add-in Yes
VertecShell.log Operations in the Explorer add-in Yes
VertecOutlook.log

Tasks in the Outlook App

Storage path: C:\Users\vorname.nachname\AppData\Local\Vertec Outlook App\Vertec.Outlook.log

Yes

Define your own log file

You can specify your own Logfilename in the Log section of the Vertec.ini file. Operation of the Desktop App and the Cloud App are logged to this file.

This is not overwritten at the start of the program, but all log information is appended to the back.

The maximum size of log files is limited to 1 MB. Older data is stored in backup files 1-9 (for example: Vertec.Desktop.1.Log). This is done automatically.

Log files of services and sessions

If no LogFileFolder is specified in the Log section of the Vertec.ini file, these logfiles are located in the folder C:\ProgramData\. Analogous to the folder %appdata% (see above), you can access this folder directly via %programdata%.

If the Restrict Session Process option is enabled in the [CloudServer] section of the Vertec.ini file, the Vertec Cloud Server can start with an Admin account (not with the Local System Account) as of Vertec 6.8.0.7 Vertec.Session.log In earlier versions, the session logfile is stored in the folder C:\WINDOWS\system32\config\systemprofile\AppData\LocalLow.  

Logfile Logging Overridden at program start
Vertec.CloudServer.log Vertec CloudServer and LDAP authentication processes No
Vertec.Session.log Operations in Cloud Client Sessions and Scheduled Tasks as of version 6.6.0.7 No
Vertec.TaskRunner.log Scheduled tasks before version 6.6.0.7 No

Logging via script

The python method log passes the information directly to the Vertec Logging System. This information is processed in the same way as above, i.e. in the corresponding logfile and/or as entries in the database.

log(category: string, level: int, msg: string)

Log Message in Vertec Logging System.

  • Levels:
    • 10: Debug log
    • 20: Info log
    • 30: Warning Log
    • 40: Error log
    • 50: Fatal Log
  • category: max 50 symbols
  • msg: max 1000 symbols

Example Script

Registered as Event Script Event script deletedelete

# coding: windows-1252
#
#---Bezeichnung: EventLog:
#   Klassen: N
#   ObjectScript: N
#   ContainerScript: N
#   EventType: Kein
#   EventClass: To specify
#   EventMembers: To specify
#   ExtendedRights: N

import vtcapp

def main():
    #aktuell angemeldeter Benutzer
    vertecUserName = vtcapp.evalocl("Timsession.allInstances->first.login.asstring")
    #spezifiziere Kategorie
    logCategory = "ExampleCategory"
    #spezifiziere Level
    logLevel = 20
    #setze die Message zusammen
    logObjectType = argobject.eval("self->oclType.asstring")
    logObjectId = argobject.eval("boldid")
    vtcapp.log(logCategory,logLevel,"'%s' mit der ID '%i' gelöscht durch '%s'"  %(logObjectType,logObjectId,vertecUserName))
main()

The entries in the script are level 20, so they automatically appear in the logfile.

If the entries are assigned to level 10, the log section in the Vertec.ini file must be supplemented with the debug category vertec.ExampleCategory specified in the script to list the entries.

Sending log output to log server

OpenObserve

As of Vertec version 6.7.0.12. Once an OpenObserve server URL and user name are configured (see below), Vertec sends LogMessages to Openobserve.

The following variables must be set in the Log section in the vertec.ini file:

[Log]
OpenObserveUrl=<URL>
OpenObserveUsername=<USERNAME>
OpenObservePassword=<PASSWORD>

The OpenObserveUrl must be the URL of the _multi-endpoints. After setting these values, the Vertec Cloud Server must be restarted.

The following values are sent to OpenObserve:

  • _timestamp: Time of log entry in ISO-8601 format
  • hostName: hostname of the machine on which the process is running
  • level: Log Level of the information (e.g. ERROR)
  • licensee: Company name of the licensee
  • loggerName: Name of the affected logger (e.g. Vertec.Session.BaseSessionContext)
  • Message: The actual log information (e.g. Handling message with low priority)
  • process: Name of the affected process (e.g. Vertec.Session)
  • threadname: Name or ID of the current thread

Loggly

As of Vertec 6.4.0.9. The log output can be sent from the Vertec processes (Vertec.Desktop, Vertec.CloudServer, Vertec.Session) to the cloud-based logger service Loggly.

To do this, set the following values in the Vertec.ini file in the [Log] section:

  • LogglyToken: Enter the custom Loggly token. If this value is set, the log output is sent to Loggly or to the specified LogglyUrl.
  • LogglyUrl: Specifies the desired URL for Loggly. If nothing is specified, the output is sent to https://logs-01.loggly.com/.

After setting these values, the Vertec Cloud Server must be restarted.

The following values are sent to Loggly:

  • hostName: hostname of the machine on which the process is running
  • level: Log Level of the information (e.g. ERROR)
  • loggerName: Name of the affected logger (e.g. Vertec.Session.BaseSessionContext)
  • Message: The actual log information
  • process: Name of the affected process (e.g. Vertec.Session)
  • timestamp: Time of log entry in ISO-8601 format

The customer name from the license information is sent as a tag if it is available at the time of the log entry (very early in the boot process this information is not yet available).

Netherlands

United Kingdom