VLCLibrary: debugLogging status (closes #186) #30
Conversation
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; |
mkchoi212
Jul 20, 2018
•
Author
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.
Decided to set a default value for the logging level because I think an invalid debug logging level isn't worth causing a crash.
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?
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?
mkchoi212
Jul 20, 2018
Author
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.
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.
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 ?
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 ?
4e1ed03
to
3aace59
if (debugLogging) { | ||
libvlc_log_set(_instance, HandleMessage, (__bridge void *)(self)); | ||
} else { | ||
libvlc_log_unset(_instance); | ||
} | ||
} | ||
|
||
- (void)setDebugLoggingLevel:(int)debugLoggingLevel | ||
{ | ||
if (debugLoggingLevel < 0 && debugLoggingLevel > 4) { |
ba827f3
to
2a1db09
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. |
fkuehne
Jul 29, 2018
Contributor
I'm not sure if this underling syntax is permitted in doxygen. Can you verify this?
I'm not sure if this underling syntax is permitted in doxygen. Can you verify this?
mkchoi212
Jul 30, 2018
Author
Contributor
Ah I had no idea this was run through doxygen. And turns out, doxygen only supports __
syntax for markdown.
Ah I had no idea this was run through doxygen. And turns out, doxygen only supports __
syntax for markdown.
ping |
merged |
Fixes the bugs
debugLoggingStatus
can not be setdebugLoggingLevel
can exceed the set range of 0-4