CC_snippets/centralLoggingSystem/readme.md

30 lines
1.3 KiB
Markdown
Raw Normal View History

2023-09-05 12:41:49 +02:00
# 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
2023-09-05 12:41:49 +02:00
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
2023-09-09 01:14:08 +02:00
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
```lua
local logger = require("/loggerClient")
logger.log("testLogger", "this is a test log")
```
2023-09-05 12:41:49 +02:00
# Dependencies
- [Lua_AES](https://github.com/idiomic/Lua_AES)