IAdmServiceLog
The IAdmServiceLog interface represents the Adaxes service log and its settings.
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 Adaxes services sharing configuration with the current service can connect to.
-
GetCommunicationStatus()
-
Checks whether all Adaxes services sharing 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 logging is enabled in Adaxes.
-
DatabaseType
-
Gets the type of the log database 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 IETF language tag 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 email addresses where 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 – the database type.
- dbInfo – information about the database.
- If
dbTypeis set toADM_LOGDATABASETYPE_LOCAL, this parameter must benull. - If
dbTypeis set toADM_LOGDATABASETYPE_MSSQL, this parameter must be set to an instance of the IAdmServiceLogMSSqlServerDatabaseInfo interface.
- If
GetDatabaseServers()
Returns the names of database servers installed in the current organization.
string[] GetDatabaseServers(ADM_LOGDATABASETYPE_ENUM dbType)
Parameters
- dbType – the type of database servers to return.
GetDatabases()
Returns information about databases installed on the specified server.
object[] GetDatabases(ADM_LOGDATABASETYPE_ENUM dbType, string server)
Parameters
- dbType – the database type. Currently, the only supported type is
ADM_LOGDATABASETYPE_MSSQL. - server – the name of the database server.
Return value
An object[], where each item represents information about a single database. The interfaces supported by the items in the array depend on the database type specified in 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 – the database type. Currently, the only supported type is
ADM_LOGDATABASETYPE_MSSQL. - server – the name of the database server.
- databaseName – 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 Adaxes services sharing configuration with the current service can connect to.
IAdmServiceLogDatabaseServerCommunicationInfo[] GetCommunicationInfo()
GetCommunicationStatus()
Checks whether all Adaxes services sharing 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 – the database type.
- dbInfo – information about the database.
- If the
dbTypeparameter is set toADM_LOGDATABASETYPE_LOCAL, this parameter must benull. - If the
dbTypeparameter is set toADM_LOGDATABASETYPE_MSSQL, this parameter must be set to an instance of the IAdmServiceLogMSSqlServerDatabaseInfo interface.
- If the
- username – the username that will be used to connect to the database server.
- If this parameter is set to
null, the username of the Adaxes service account is used. - If this parameter is set to an empty string, saved credentials will be used to connect to the server. If there are no saved credentials, the Adaxes service account is used.
- If the
dbTypeparameter is set toADM_LOGDATABASETYPE_LOCAL, this parameter is ignored.
- If this parameter is set to
- password – the password to use with the username provided. If the
dbTypeparameter is set toADM_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 – the database type. Currently, the only supported type is
ADM_LOGDATABASETYPE_MSSQL. - server – the name of the database server.
- username – the username that will be used to connect to the server.
- If this parameter is set to
null, the username of the Adaxes service account is used. - If this parameter is set to an empty string, saved credentials will be used to connect to the server. If there are no saved credentials, Adaxes service account is used.
- If this parameter is set to
- password – the password to use with the username provided.
Return value
An object[], where each item 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 – the database type. Currently, the only supported type is
ADM_LOGDATABASETYPE_MSSQL. - server – the name of the database server.
- databaseName – the database name.
- username – the username that will be used to connect to the server.
- If this parameter is set to
null, the username of the Adaxes service account is used. - If this parameter is set to an empty string, saved credentials will be used to connect to the server. If there are no saved credentials, Adaxes service account is used.
- If this parameter is set to
- password – 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 invalid, the method throws a Softerra.Adaxes.Logging.ExternalDatabaseException.
object[] GetDatabasesEx(ADM_LOGDATABASETYPE_ENUM dbType,
string server,
string username,
string password)
Parameters
- dbType – the database type. Currently, the only supported type is
ADM_LOGDATABASETYPE_MSSQL. - server – the name of the database server.
- username – the username to validate.
- password – 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 logging is enabled in Adaxes.
- Type:
- bool
- Access:
- Read/Write
DatabaseType
Gets the type of the log database currently used by the Adaxes service.
- Type:
- ADM_LOGDATABASETYPE_ENUM
- Access:
- Read-only
DatabaseInfo
Gets an object that represents the log database currently used by the Adaxes service.
- Type:
- Object
- Access:
- Read-only
Remarks
- If the
DatabaseTypeproperty is set toADM_LOGDATABASETYPE_LOCAL, this property contains an instance of the IAdmServiceLogLocalDBInfo interface. - If the
DatabaseTypeproperty is set toADM_LOGDATABASETYPE_MSSQL, this property contains an instance of the IAdmServiceLogMSSqlServerDatabaseInfo interface.
CultureName
Gets or sets the name of the culture in the IETF language tag 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.
- Type:
- IAdmGeneralLog
- Access:
- Read/Write
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 email addresses where 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