Posted 06 January 2014 - 04:31 PM
CC-Logging provides a simple API for logging in ComputerCraft Lua that is based of Lua Logging. It currently supports logging to a function and to a file. Both can be provided by the user. The file should be closed after use automatically.
The documentation can be found here.
Usage example:
Download:
The file can be fetched from my Github repo here or from pastebin: LeNqT36Q
If you have any questions, feel free to ask them here.
You can use this wherever you want, but it would be nice if you give me credit.
The documentation can be found here.
Usage example:
os.loadAPI("logging")
local logger = logging.new{func = function(self, level, message)
print(level..": "..message)
end,
file = "log.log"}
logger:info("Opened log file")
Download:
The file can be fetched from my Github repo here or from pastebin: LeNqT36Q
If you have any questions, feel free to ask them here.
You can use this wherever you want, but it would be nice if you give me credit.
Edited on 06 January 2014 - 04:41 PM