Skip to content

mc-cc-scripts/log-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

log-lib

A Library to ease logging of data

local log = require('./libs/log')
local filePath = './Output.lua'
local content = {
    key1 = 'value1',
    key2 = 'value2'
}
-- write into file:
log.write(content, filePath, "w+")

-- write into default error File, incl. traceback:
log.ErrorHandler(content, nil)

write

Default dataAccess is "w+"

log.write(content: <table|string>, filePath: <string>, dataAccess: <string>)
DataAccess:
"w" | "w+" | "a" | "a+"

ErrorHandler

log.ErrorHandler(content: <table|string>, filePath: <string|nil>, traceback: <boolean|nil>)

About

A Library for Logs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages