LogStoreBackend Property

General info

Label

Log Store Backend

Description

Configure backends for the log data store.

Data type

UInt32

Default value

1 (syslib.model.codes.LogStoreBackend.MONGODB)

Type

CodingGroup

Code

14569

Symbolic name

MODEL_PROP_LOGSTOREBACKEND

Lua access code

syslib.model.properties.LogStoreBackend

Available since

1.96

Parent classes

LogDataStore

Parent properties

LogStoreSettings

Attributes

Name Tooltip
PROP_CONFIGURABLE The property is configurable and can be changed with DataStudio and the various inmation APIs.
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs.
PROP_HAS_DEFAULT The property has a default value as standard.

Codings

Coding group: LogStoreBackend

Name Code Label Tooltip

MONGODB

1

MongoDB

Store data in MongoDB.

SQLITE

2

SQLite

Store data in SQLite.

Examples

Read from or write to the LogStoreBackend property.

  • Lua

  • C#

-- Read from the LogStoreBackend
syslib.getvalue("<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.LogStoreBackend")

-- Write to the LogStoreBackend
syslib.setvalue("<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.LogStoreBackend",
    syslib.model.codes.LogStoreBackend.MONGODB)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the LogStoreBackend
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.LogStoreBackend"));
// Write to the LogStoreBackend
Result result = sli.WriteValue(sc, new WriteItem(LogStoreBackend.MONGODB, "<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.LogStoreBackend"));

A switch-like function of the codings.

function get_coding_name(code)
    local _lsb = syslib.model.codes.LogStoreBackend
    if _lsb.MONGODB==code then return 'MONGODB'
    elseif _lsb.SQLITE==code then return 'SQLITE'
    end
end
return get_coding_name(syslib.model.codes.LogStoreBackend.MONGODB)