Creating Log Files - API Server - English - Foundation 22.1 - OnBase - Essential - Premier - Standard - external - Premier - Standard - Essential

API Server

Platform
OnBase
Product
API Server
Release
Foundation 22.1
License
Premier
Standard
Essential

Logging routes can be configured to write logs to separate external .log files. These files can later be opened for viewing in the Diagnostics Console or in a text editor such as Notepad.

To configure Hyland.Logging to write log files:

  1. Open the .json file for the application that contains the Hyland.Logging element.
  2. Locate the Hyland.Logging element.
  3. Add the following logging route to the element:
    1. "File": {

      "File": "FILEPATH",

      "Maximum-Level": "Critical",

      "Minimum-Level": "Information",

      "write-to:File.rollingInterval": "Day",

      "write-to:File.rollOnFileSizeLimit": true,

      "write-to:File.retainedFileCountLimit": 30,

      "write-to:File.fileSizeLimitBytes": 10485760

      }

  4. Replace "FILEPATH" with the file path for the log file, including the name of the file you want the log to be saved as. This file must be a .log file. For example, "./logs/ApiServer.log" would write the logs to a file called ApiServer.log in the /logs directory within the directory where the application is installed.
  5. Set the "Maximum-Level" attribute to the maximum level of severity you want to be reported in the log.
  6. Set the "Minimum-Level" attribute to the minimum level of severity you want to be reported in the log.
  7. Set the " write-to:File.rollingInterval" attribute to the interval that you want a new log created. The following intervals are available for use:

    Interval

    Description

    Minute

    A new log file is created every minute.

    Hour

    A new log file is created every hour.

    Day

    A new log file is created every day.

    Month

    A new log file is created every month.

    Year

    A new log file is created every year.

    Infinite

    A new log is never created.

  8. Set the "write-to:File.rollOnFileSizeLimit" attribute to "true" or "false" to limit log files based on size. If set to "true", a new log file to be created when the current log file reaches the configured size limit.
  9. Set the "write-to:File.retainedFileCountLimit" attribute to the number of log files to be kept before older files are deleted. If you do not want to delete older files, you can set the value to "null".
  10. Set the "write-to:File.fileSizeLimitBytes" attribute to the maximum size in bytes a log file can be before creating a new file. This attribute is only active if "write-to:File.rollOnFileSizeLimit" is set to "true".
  11. Save the file and close the text editor.
  12. Reset the application.