Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.31 KB

README.md

File metadata and controls

52 lines (42 loc) · 1.31 KB

loggy

Simple lua logging utility.

Preview:

Messages Table

Types of messages:

  • Regular (regular): Regular message.
  • Trace (trace): Tracing message.
  • Debug (debug): Common debug message.
  • Info (info): Information/Note message.
  • Ok (ok): Indicates something works.
  • Warn (warn): Warning.
  • Error (error): Error.
  • Fatal (fatal): Fatal error.

Message chaining

You can chain messages to section logs or log information in various lines in a more readable way.

Chained messages Chained code

Installation

  1. Clone the library
git clone https://github.com/Nykenik24/loggy loggy
  1. Require the library
local loggy = require("loggy")

Usage

When you have loggy installed, you can use it like this:

local loggy = require("loggy")

-- Normal messages          Chained messages
loggy.message_type(message).message_type(message)

If you have long chained sections, you can use this syntax:

loggy.message_type(message)
.message_type(message)
.message_type(message)
.message_type(message)

Loggy was adapted from the logger module of my library Love2d Tools