IAdmServiceLog

The IAdmServiceLog interface represents the Adaxes service log.

Inheritance: IAdmTop

Methods

  • Method

  • Description

  • SetDatabaseType()

  • Sets the type of the database where the service log will be stored.

  • GetDatabaseServers()

  • Returns names of database servers installed in the current organization.

  • GetDatabases()

  • Returns information about databases installed on the specified server.

  • GetDatabase()

  • Returns information about the specified external database.

  • GetCommunicationInfo()

  • Returns information about external databases that each Adaxes service sharing common configuration with the current service can connect to.

  • GetCommunicationStatus()

  • Checks whether all Adaxes services sharing common configuration with the current service can write log records.

  • SetDatabaseTypeEx()

  • Sets the type of the database where the service logs will be stored.

  • GetDatabasesEx()

  • Gets information about databases installed on the given MS SQL server.

  • GetDatabaseEx()

  • Gets information about databases installed on the given MS SQL server.

  • ValidateCredential()

  • Validates whether the specified username and password are valid for the specified database server.

Properties

  • Property

  • Description

  • Enabled

  • Gets or sets a value indicating whether the logging feature of Adaxes is enabled.

  • DatabaseType

  • Gets the type of the log database that is currently used by the Adaxes service.

  • DatabaseInfo

  • Gets an Object that represents the log database currently used by the Adaxes service.

  • CultureName

  • Gets or sets the name of the culture in the languagecode2-country/regioncode2 format (e.g. en-US). The culture determines the language and date formatting options for log records.

  • LogHoldTime

  • Gets or sets the number of days during which log records are kept in the database.

  • ExcludedActionTypes

  • Gets or sets an array of action types to be excluded from logging.

  • ExcludedTargetObjectTypes

  • Gets or sets an array of target object types to be excluded from logging.

  • GeneralLog

  • Gets the General Log that contains all Adaxes log records.

  • ErrorReportingEnabled

  • Gets or sets a value that indicates whether email error reporting is enabled.

  • ErrorReportingEmails

  • Gets or sets a semicolon-separated list of e-mail addresses, to which error reports will be sent.

  • LocalDatabasePath

  • Gets the path of the local database file.

  • SyslogOutputEnabled

  • Gets or sets a value indicating whether Syslog output is enabled.

  • SyslogServer

  • Gets or sets the Syslog server to which Adaxes will send Syslog messages.

  • DatabaseUserName

  • Gets the username of the account whose credentials are used to connect to the external database.

Details

SetDatabaseType()

Sets the type of the database where the service log will be stored.

void SetDatabaseType(ADM_LOGDATABASETYPE_ENUM dbType, Object dbInfo)

Parameters

  • dbType - Specifies the database type.
  • dbInfo - Contains information about the database.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter must be null.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_MSSQL, this parameter must be set to an instance of the IAdmServiceLogMSSqlServerDatabaseInfo interface.

GetDatabaseServers()

Returns names of database servers installed in the current organization.

string[] GetDatabaseServers(ADM_LOGDATABASETYPE_ENUM dbType)

Parameters

The dbType parameter specifies the type of database servers that will be returned.


GetDatabases()

Returns information about databases installed on the specified server.

Object[] GetDatabases(ADM_LOGDATABASETYPE_ENUM dbType, string server)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.

Return value

An Object[] array, where each OBJECTTYPE represents information about a single database. The interfaces supported by items in the array depend on the database type specified by the dbType parameter.

Currently, the only supported database type is ADM_LOGDATABASETYPE_MSSQL, and each item in the array returned by the method implements the IAdmServiceLogMSSqlServerDatabaseInfo interface.


GetDatabase()

Returns information about the specified external database.

Object GetDatabase(ADM_LOGDATABASETYPE_ENUM dbType,
                   string server,
                   string databaseName)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • databaseName - Specifies the database name.

Return value

An Object that represents information about the specified database. The interfaces supported by the returned value depend on the database type specified by the dbType parameter.

Currently, the only supported database type is ADM_LOGDATABASETYPE_MSSQL, and the object returned by the method implements the IAdmServiceLogMSSqlServerDatabaseInfo interface.


GetCommunicationInfo()

Returns information about external databases that each Adaxes service sharing common configuration with the current service can connect to.

IAdmServiceLogDatabaseServerCommunicationInfo[] GetCommunicationInfo()

GetCommunicationStatus()

Checks whether all Adaxes services sharing common configuration with the current service can write log records.

ADM_COMUNICATIONSTATUS_ENUM GetCommunicationStatus()

Return value

  • ADM_COMUNICATIONSTATUS_SUCCESS - All Adaxes services can write log records.
  • ADM_COMUNICATIONSTATUS_ERROR - At least one of the Adaxes services cannot write log records.
  • ADM_COMUNICATIONSTATUS_PENDING - The service log settings have not been replicated to all services yet.

SetDatabaseTypeEx()

Sets the type of the database where the service logs will be stored. This method extends the SetDatabaseType method with the possibility to specify credentials for the given database.

void SetDatabaseTypeEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        Object dbInfo,
                        string username,
                        string password)

Parameters

  • dbType - Specifies the database type.
  • dbInfo - Contains information about the database.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter must be null.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_MSSQL, this parameter must be set to an instance of the IAdmServiceLogMSSqlServerDatabaseInfo interface.
  • username - Contains the username that will be used to connect to the database server.
    • If the username parameter is set to null, the username of the Adaxes service account is used.
    • If the username parameter is set to an empty string, the credentials used to connect to the server are not changed. Saved credentials are used.
    • If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter is ignored.
  • password - Specifies the password to use with the username provided. If the dbType parameter is set to ADM_LOGDATABASETYPE_LOCAL, this parameter is ignored.

GetDatabasesEx()

Gets information about databases installed on the given MS SQL server. This method extends the GetDatabases method with the possibility to specify credentials to use when connecting to the server.

Object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        string server,
                        string username,
                        string password)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • username - Contains the username that will be used to connect to the server.
    • If the username parameter is set to null, the username of the Adaxes service account is used.
    • If the username parameter is set to an empty string, the credentials saved in Adaxes service are used. If there are no saved credentials, Adaxes service account is used.
  • password - Specifies the password to use with the username provided.

Return value

An Object[] array, where each Object represents information about a single database. The interfaces supported by items in the array depend on the database type specified by the dbType parameter. Currently, the only supported database type is ADM_LOGDATABASETYPE_MSSQL, and each item in the array returned by the method implements the IAdmServiceLogMSSqlServerDatabaseInfo interface.


GetDatabaseEx()

Gets information about databases installed on the given MS SQL server. This method extends the GetDatabases method with the possibility to specify credentials to use when connecting to the server.

Object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        string server,
                        string databaseName,
                        string username,
                        string password)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • databaseName - Specifies the database name.
  • username - Contains the username that will be used to connect to the server.
    • If the username parameter is set to null, the username of the Adaxes service account is used.
    • If the username parameter is set to an empty string, the credentials saved in Adaxes service are used. If there are no saved credentials, Adaxes service account is used.
  • password - Specifies the password to use with the username provided.

Return value

An object that represents information about the specified database. The interfaces supported by the returned value depend on the database type specified by the dbType parameter.

Currently, the only supported database type is ADM_LOGDATABASETYPE_MSSQL, and the object returned by the method implements the IAdmServiceLogMSSqlServerDatabaseInfo interface.


ValidateCredential()

Validates whether the specified username and password are valid for the specified database server. If the credentials are not valid, the method throws a Softerra.Adaxes.Logging.ExternalDatabaseException.

Object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
                        string server,
                        string username,
                        string password)

Parameters

  • dbType - Specifies the database type. Currently, the only supported type is ADM_LOGDATABASETYPE_MSSQL.
  • server - Specifies the name of the database server.
  • username - Contains the username to validate.
  • password - Specifies the password to use with the username provided.

Exceptions

  • Softerra.Adaxes.Logging.ExternalDatabaseException
  • The provided credentials are not valid for the specified server.

Enabled

Gets or sets a value indicating whether the logging feature of Adaxes is enabled.

  • Type:
  • bool
  • Access:
  • Read/Write

DatabaseType

Gets the type of the log database that is currently used by the Adaxes service.


DatabaseInfo

Gets an Object that represents the log database currently used by the Adaxes service.

  • Type:
  • Object
  • Access:
  • Read-only

Remarks


CultureName

Gets or sets the name of the culture in the languagecode2-country/regioncode2 format (e.g. en-US). The culture determines the language and date formatting options for log records.

  • Type:
  • string
  • Access:
  • Read-only

LogHoldTime

Gets or sets the number of days during which log records are kept in the database.

  • Type:
  • int
  • Access:
  • Read/Write

ExcludedActionTypes

Gets or sets an array of action types to be excluded from logging.

  • Type:
  • string[]
  • Access:
  • Read/Write

ExcludedTargetObjectTypes

Gets or sets an array of target object types to be excluded from logging.

  • Type:
  • string[]
  • Access:
  • Read/Write

GeneralLog

Gets the General Log that contains all Adaxes log records.


ErrorReportingEnabled

Gets or sets a value that indicates whether email error reporting is enabled.

  • Type:
  • bool
  • Access:
  • Read/Write

ErrorReportingEmails

Gets or sets a semicolon-separated list of e-mail addresses, to which error reports will be sent.

  • Type:
  • string
  • Access:
  • Read/Write

LocalDatabasePath

Gets the path of the local database file.

  • Type:
  • string
  • Access:
  • Read-only

SyslogOutputEnabled

Gets or sets a value indicating whether Syslog output is enabled.

  • Type:
  • bool
  • Access:
  • Read/Write

SyslogServer

Gets or sets the Syslog server to which Adaxes will send Syslog messages. A server is identified by its host name or IP address and an optional port number (e.g. mysyslog.company.com:514 or 192.168.10.10).

  • Type:
  • string
  • Access:
  • Read/Write

DatabaseUserName

Gets the username of the account whose credentials are used to connect to the external database. If the property is null, the credentials of the Adaxes service account are used.

  • Type:
  • string
  • Access:
  • Read-only

Requirements

Minimum required version: 2023

See also