Keys in the ODB /Logger/History subtree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==== Links ====
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/reference/reference/odb_keys/#loggerhistory /Logger/History] on the ODB keys page and [https://midas.triumf.ca/docs/develop/features/storing_data/history/configuring/#data-destinations-history-drivers Data destinations (history drivers)] on the History: configuring page for the new documentation about the /Logger/History ODB keys.
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[/Logger ODB tree| /Logger tree]]
* [[Logging to a mySQL database]]
* [[Keys in the ODB /Logger/Channels subtree| /Logger/Channels subtree]]
* [[Keys in the ODB /Logger/SQL subtree| /Logger/SQL subtree]]
* [[mlogger |MIDAS logger (mlogger)]]
</div>
<br>
---------------
<br>
 
== <span style="color: purple;">''/Logger/History''</span> subtree ==
 
The ODB <span style="color: purple;">''/Logger/History''</span>  subtree is a subdirectory of the [[Keys in the ODB /Logger tree | ODB /Logger tree]], created
when the MIDAS logger utility [[mlogger]] is started for the first time. The keys will be filled with default values which users may change as required to customize their experiments.
 
When [[mlogger]] is started for the first time, it creates '''three''' odb subtrees
<span style="color: purple;">''0,1''</span> and <span style="color: purple;">''2''</span> as shown in the following example:
 
=== Example  ===
The following example shows the <span style="color:purple; font-style:italic">/Logger/History </span>  ODB subtree after creation by [[mlogger]]  (obtained using the [[odbedit]] '''ls''' command).
See below for information on individual keys.
 
[local:pol:S]/>cd /logger
[local:pol:S]/Logger>ls -r history
History
    0
        Type                    MIDAS
        Active                  y
        Debug                  0
        PerVariableHistory      0
    1
        Type                    ODBC
        Active                  n
        Debug                  0
        Writer_ODBC_DSN        history_writer
        Reader_ODBC_DSN        history_reader
    2
        Type                    SQLITE
        Active                  n
        Debug                  0
        Sqlite dir
 
The three subtrees are each a ''history-logging-channel'' created
to control one of the three different types of history logging available, i.e. MIDAS, ODBC and SQLITE.
 
Each subdirectory is created with a different value in the
<span style="color:purple; font-style:italic">subkey "Type"</span>, i.e.
 
* Subtree  <span style="color: purple;">''0''</span> for MIDAS  (key <span style="color:purple; font-style:italic">Type</span> set to "MIDAS")
* Subtree  <span style="color: purple;">''1''</span> for ODBC  (key <span style="color:purple; font-style:italic">Type</span> set to "ODBC")
* Subtree  <span style="color: purple;">''2''</span> for SQLITE (key <span style="color:purple; font-style:italic">Type</span> set to "SQLITE")
 
 
The keys present in each ''history-logging-channel'' are described below.
<br>
-----
<br>
 
== <span style="color: purple;">''/Logger/History/0/''</span> subtree ==
 
This subtree controls history logging of Midas events.
 
<br>
-----
<br>
 
=== <span style="color: purple;">''/Logger/History/0/Type''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  MIDAS
</div>
 
This key specifies the type of history logging for this ''history-logging-channel''.
 
[[mlogger]] creates this channel with this key set to "MIDAS" since this subtree  <span style="color: purple;">''0''</span>  controls MIDAS history logging.
 
<br>
----------
<br>
 
 
 
=== <span style="color: purple;">''/Logger/History/0/Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "y"
</div>
 
If set to "y", MIDAS history logging is active.
Set to "n" to disable MIDAS history logging.
 
See also [[#/Logger/History/0/Type|Type key]].
 
Note:this key replaces obsolete key
[[Keys in the ODB /Logger tree #/Logger/WriteFileHistory|/Logger/WriteFileHistory]]
 
<br>
--------------
<br>
 
 
 
=== <span style="color: purple;">''/Logger/History/0/Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
If set to 1, debug is enabled for this history logging channel.
 
<br>
--------------
<br>
 
 
 
=== <span style="color: purple;">''/Logger/History/0/PerVariableHistory''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
This key is present in a history channel of Type "MIDAS" only (see  [[#/Logger/History/0/Type|Type key]]).
 
The default value of 0 is intended to operate the midas history in "traditional" mode. In this mode:
* there is one history record for each equipment
* history record id is equal to the equipment id
* /History/Events and /History/Tags are not required and can be safely deleted
 
 
Note: this key replaces obsolete key /history/PerVariableHistory
<br>
--------------
<br>
 
 
 
 
 
 
 
 
== <span style="color: purple;">''/Logger/History/1/''</span> subtree ==
 
This subtree controls history logging of ODBC
 
 
 
 
=== <span style="color: purple;">''/Logger/History/1/Type''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "ODBC"
</div>
 
This key specifies the type of history logging for this ''history-logging-channel''.
 
[[mlogger]] creates this channel with this key set to "ODBC" since this subtree  <span style="color: purple;">''1''</span>  controls ODBC history logging.
 
<br>
----------
<br>
 
=== <span style="color: purple;">''/Logger/History/1/Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
 
If set to "y", ODBC history logging is active.
 
 
See also [[#/Logger/History/1/Type|Type key]].  
 
 
 
=== <span style="color: purple;">''/Logger/History/1/Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
If set to 1, debug is enabled for ODBC history logging.
 
See also [[#/Logger/History/1/Type|Type key]].
 
 
Note: this key replaces obsolete key
[[Keys in the ODB /Logger tree #/Logger/ODBC_Debug |/Logger/ODBC_Debug]]
<br>
--------------
<br>
 
=== <span style="color: purple;">''/Logger/History/1/Writer_ODBC_DSN''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "history_writer"
</div>
 
This key is present in a history channel of Type "ODBC" only, and is created by [[mlogger]].
 
See also [[#/Logger/History/1/Type|Type key]].
 
Note: this key replaces obsolete key
[[Keys in the ODB /Logger tree #/Logger/ODBC DSN |/Logger/ODBC DSN]]
<br>
--------------
<br>
 
=== <span style="color: purple;">''/Logger/History/1/Reader_ODBC_DSN''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "history_reader"
</div>
 
This key is present in a history channel of Type "ODBC" only, and is created by [[mlogger]].
 
See also [[#/Logger/History/1/Type|Type key]].
 
Note: this key replaces obsolete key /history/ODB_DSN
 
 
 
<br>
--------------
<br>
 
 
 
 
== <span style="color: purple;">''/Logger/History/2/''</span> subtree ==
 
This subtree controls history logging of SQLITE
 
 
=== <span style="color: purple;">''/Logger/History/2/Type''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "SQLITE"
</div>
 
This key specifies the type of history logging for this ''history-logging-channel''.
 
[[mlogger]] creates this channel with this key set to "SQLITE" since this subtree  <span style="color: purple;">''2''</span>  controls SQLITE history logging.
 
<br>
----------
<br>
 
=== <span style="color: purple;">''/Logger/History/2/Active''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
 
If set to "y", SQLITE history logging is active.
 
 
See also [[#/Logger/History/2/Type|Type key]].
 
 
 
=== <span style="color: purple;">''/Logger/History/2/Debug''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
 
If set to 1, debug is enabled for SQLITE history logging.
 
See also [[#/Logger/History/2/Type|Type key]].
 
 
<br>
--------------
<br>
 
 
=== <span style="color: purple;">''/Logger/History/2/Sqlite dir''</span> ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
 
This key is present in a history channel of Type "SQLITE" only, and is created by [[mlogger]].
 
See also [[#/Logger/History/2/Type|Type key]].

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See /Logger/History on the ODB keys page and Data destinations (history drivers) on the History: configuring page for the new documentation about the /Logger/History ODB keys.