Skip to content
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

Merged
merged 9 commits into from
Oct 2, 2023
Merged

Added Logger.lua module and removed old log function #310

merged 9 commits into from
Oct 2, 2023

Conversation

jdahlblom
Copy link
Contributor

This has the most needed functions for logging, dumping tables etc.

@jdahlblom jdahlblom marked this pull request as ready for review October 1, 2023 17:39
function ScriptPath()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
end
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

@jdahlblom jdahlblom added this pull request to the merge queue Oct 2, 2023
Merged via the queue into DCS-Skunkworks:master with commit 993130a Oct 2, 2023
@jdahlblom jdahlblom deleted the loggerlua-added branch October 2, 2023 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants