Skip to content
Antoine CLOP edited this page May 6, 2019 · 2 revisions

Logger

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

Methods

  • setAllChannels(enabled: Bool)
  • setChannel(_ channel: Channel, enabled: Bool)

setAllChannels

Parameters

  • 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.

Usage example

Logger.setAllChannels(enabled: false)

setChannel

Parameters

  • 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.

Usage example

Logger.setChannel(.Debug, enabled: true)
Clone this wiki locally