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

VLCLibrary: debugLogging status (closes #186) #30

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@mkchoi212
Contributor

mkchoi212 commented Jul 20, 2018

Fixes the bugs

  • debugLoggingStatus can not be set
  • debugLoggingLevel can exceed the set range of 0-4
VKLog(@"Invalid debugLoggingLevel of %d provided", debugLoggingLevel);
VKLog(@"Please provide a valid debugLoggingLevel between 0 and 4");
VKLog(@"Defaulting debugLoggingLevel to 4 (just errors)");
_debugLoggingLevel = 4;

This comment has been minimized.

@mkchoi212

mkchoi212 Jul 20, 2018

Contributor

Decided to set a default value for the logging level because I think an invalid debug logging level isn't worth causing a crash.

This comment has been minimized.

@fkuehne

fkuehne Jul 20, 2018

Contributor

The scale is the other way around - 0 is just errors, whereas 4 is "everything VLC ever wanted to tell you about anything". So the default should be 0.
However, there is something wrong if there is a crash when the user provides 5. Are you sure that this is happening?

This comment has been minimized.

@mkchoi212

mkchoi212 Jul 20, 2018

Contributor

Gotcha! Also, it doesn't crash. What I meant was that I initially thought about doing fatalError("Invalid debugging level x") but just decided to warn the user about it.

This comment has been minimized.

@carolanitz

carolanitz Jul 20, 2018

Member

What do you think about just capping the value between 0 and 4 meaning <0 to 0 >4 to 4 and if it's outside those bounds log the message ?

@mkchoi212 mkchoi212 force-pushed the mkchoi212:lib-test branch 2 times, most recently from 4e1ed03 to 3aace59 Jul 23, 2018

if (debugLogging) {
libvlc_log_set(_instance, HandleMessage, (__bridge void *)(self));
} else {
libvlc_log_unset(_instance);
}
}
- (void)setDebugLoggingLevel:(int)debugLoggingLevel
{
if (debugLoggingLevel < 0 && debugLoggingLevel > 4) {

This comment has been minimized.

@mkchoi212

mkchoi212 Jul 23, 2018

Contributor

@carolanitz something like this?? I’m mildly confused :D

@mkchoi212 mkchoi212 referenced this pull request Jul 26, 2018

Closed

Tests: VLCLibrary #32

@mkchoi212 mkchoi212 force-pushed the mkchoi212:lib-test branch 2 times, most recently from ba827f3 to 2a1db09 Jul 26, 2018

@fkuehne

One nit-pick, rest looks good now! :)

* Currently, the framework does not support multiple instances of VLCLibrary. Furthermore, you cannot destroy any
* instiantiation of VLCLibrary, as previously noted, this is done automatically by the dynamic link loader.
* Currently, the framework __does not__ support multiple instances of VLCLibrary.
* Furthermore, you __cannot__ destroy any instance of VLCLibrary; this is done automatically by the dynamic link loader.

This comment has been minimized.

@fkuehne

fkuehne Jul 29, 2018

Contributor

I'm not sure if this underling syntax is permitted in doxygen. Can you verify this?

This comment has been minimized.

@mkchoi212

mkchoi212 Jul 30, 2018

Contributor

Ah I had no idea this was run through doxygen. And turns out, doxygen only supports __ syntax for markdown.

@mkchoi212 mkchoi212 force-pushed the mkchoi212:lib-test branch from 2a1db09 to 383ff95 Jul 30, 2018

@mkchoi212

This comment has been minimized.

Contributor

mkchoi212 commented Aug 3, 2018

ping 🔔

@carolanitz

This comment has been minimized.

Member

carolanitz commented Aug 3, 2018

merged

@carolanitz carolanitz closed this Aug 3, 2018

@mkchoi212 mkchoi212 deleted the mkchoi212:lib-test branch Aug 7, 2018

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