Skip to content

exasol/remotelog-lua

Repository files navigation

remotelog - Remote logging for Lua

Overview

The remotelog is a Lua module that provides logging capabilities. While it supports regular logging to STDOUT too, it is mainly targeted at systems where a log receiver must be on a different machine, especially when debugging problems in server processes.

The module is designed to be easily usable, compact and fast. It was originally created to allow remote logging from Lua scripts running inside an Exasol database, but works in other context as well.

In a Nutshell

The following snippet demonstrates basic remote logging. Check the user guide for more details.

local log = require("remotelog")
log.connect("thehost.example.org", 3000)
log.info("Hello world.")
log.disconnect()

Features

  • Logging to STDOUT
  • Logging to remote log receiver via a TCP socket
  • Configurable automatic fallback in case socket connection cannot be established
  • Log level control
  • Configurable timestamp format
  • Optional high-resolution timer

Table of Contents

Information for Users

Information for Developers

Run Time Dependencies

remotelog requires Lua 5.1 or later.

Dependency Purpose License
LuaSocket Socket communication MIT License

Note that LuaSucket is pre-installed on an Exasol database. For local unit testing you need to install it on the test machine though.

Test Dependencies

Dependency Purpose License
luaunit Unit testing framework BSD License
Mockagne Mocking framework MIT License

Build Dependencies

Dependency Purpose License
LuaRocks Package management MIT License