-
Notifications
You must be signed in to change notification settings - Fork 13
Logger
Antoine CLOP edited this page May 6, 2019
·
2 revisions
LeagueAPI has its own logger. It is accessible and fully manageable through static class Logger
It contains 4 different channels:
- Debug: precised internal informations on LeagueAPI actions. (disabled by default)
- Print: general informations from LeagueAPI (enabled by default)
- Warning: problems detected by LeagueAPI that may explain future errors. (enabled by default, should not be disabled)
- Error: problems encountered that prevents LeagueAPI from going further in request. (enabled by default, should not be disabled)
It is possible to access each channel state through static read only variable Logger.channels
- setAllChannels(enabled: Bool)
- setChannel(_ channel: Channel, enabled: Bool)
- enabled: new status for all channels.
This procedure set all channel status to enabled parameter value but does not return anything since it always succeed.
Logger.setAllChannels(enabled: false)
- channel: the channel to change status.
- enabled: new status for channel.
This procedure set specified channel status to enabled parameter value but does not return anything since it always succeed.
Logger.setChannel(.Debug, enabled: true)