File: log.lua

package info (click to toggle)
lxi-tools 2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,956 kB
  • sloc: ansic: 6,110; xml: 146; sh: 24; python: 12; makefile: 5
file content (22 lines) | stat: -rw-r--r-- 516 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-------------------------------------
--  lxi-tools                      --
--    https://lxi-tools.github.io  --
-------------------------------------

-- Data logger test - logging data and writing it to CSV file

-- Init
log0 = lxi_log_new()

-- Log some data
lxi_log_add(log0, 12, "text", 34, "text")
lxi_log_add(log0, 56, "text", "text", "text", 78)
lxi_log_add(log0, "text", 12, "text", 345, "text", 6)

-- Dump data to CSV file
lxi_log_save_csv(log0, "log0.csv")

-- Cleanup
lxi_log_free(log0)

print("Done")