-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Logger.lua module and removed old log function #310
Conversation
This has the most needed functions for logging, dumping tables etc.
function ScriptPath() | ||
local str = debug.getinfo(2, "S").source:sub(2) | ||
return str:match("(.*/)") | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's best to end a file with a trailing newline. That way if someone else has to come in here later and make changes, it doesn't show that they were the last one to change this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always forget, yes you told me before. Maybe now it will stick.
@@ -13,7 +14,6 @@ package.path = "./Scripts/DCS-BIOS/lib/modules/memory_map/?.lua;" .. package.pat | |||
|
|||
-- global functions that haven't been refactored yet | |||
BIOS = {} | |||
function BIOS.log(str) end -- noop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing you'll need to require lfs here. there's a mocked variant in the compile folder that should work.
This has the most needed functions for logging, dumping tables etc.