CC_snippets/centralLoggingSystem
Finn Dane c1db32243f fixed location in docs for AES.lua file 2023-09-09 01:14:52 +02:00
..
loggerClient.lua adds client library 2023-09-09 01:14:08 +02:00
readme.md fixed location in docs for AES.lua file 2023-09-09 01:14:52 +02:00
server.lua adds logging server 2023-09-05 12:41:49 +02:00

readme.md

central logging system

Logs data sent to it by various computers and prints it on printed pieces of paper.

Server Setup

  1. Download server.lua and put it on your computer (for example with wget) and put it in the startup folder (you might have to make this).
  2. Attach a printer and a modem to the computer and note on what side of the computer they are.
  3. Edit the file and change the variables printerSide and modemSide if needed.
  4. Download the dependency and "install" it by putting AES.lua in the root directoy
  5. Decide on a shared key, this has to be a number (for example use something like openssl rand -hex 16 and prefix it with 0x to get a random 16 byte number)
  6. Run set AES.key <your shared key>
  7. Choose a channel number and set the channel by changing the channel variable.

Client Setup

  1. download loggerClient.lua and put it on your computer.
  2. attach a modem to the computer and note what side it is on.
  3. set the settings logger.AES.key, logger.modemSide and logger.channel.
  4. download the AES dependency and put it in the root directory.
  5. use require to include to use this library.

Example

local logger = require("/loggerClient")

logger.log("testLogger", "this is a test log")

Dependencies