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

hs.logger updates? #1426

Open
asmagill opened this issue May 15, 2017 · 2 comments
Open

hs.logger updates? #1426

asmagill opened this issue May 15, 2017 · 2 comments

Comments

@asmagill
Copy link
Member

In conjunction with #1425, hs.logger may need some review, but it is listed here as a separate issue in case there are other hs.logger specific tweaks to be added to the mix

@cmsj
Copy link
Member

cmsj commented May 15, 2017

I think it makes sense to increase this if we're going to move core messages into hs.logger. We're talking about strings here, so almost any number is perfectly reasonable :)

@asmagill
Copy link
Member Author

  • LuaSkin log methods need an overhaul -- some thoughts
    • first, remove [LuaSkin logAtLevel:withMessage:fromStackPos:] -- it never did what I had hoped (we're usually not in a good place for a useful traceback when its invoked) and I think only one module I've written actually uses it (and with no useful information added because of it) -- and I doubt anyone else has used it at all
    • modify the delegate so its callback keeps a table of hs.logger objects for each module (will probably need some mods to hs.logger for this as well since we'll want the lua side of each module to use it as well) or create one if it doesn't exist. This will allow proper directing of lua skin log messages if we also:
    • add a tag argument to the log methods which will contain the USERDATA_TAG which most modules have (and the few that don't can have added easily) so that the delegate callback can pick the right object to log the messages with
    • add support for varargs to the log methods similar to NSLog? A large portion of our log messages are sent with [NSString stringWithFormat:@"...", ...] as the string.

@cmsj, how set do you consider the delegate and logging methods of LuaSkin? If I start playing around with it trying to implement some of the above next week, will I break anything else you're using LuaSkin for or planning to use it for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants