Module Photon.Logging

Photon Logging Module

Functions

Photon.Logging.Parse(level) Parse a string logging level (such as that from cvars.String) into a level.
Photon.Logging._print(...) Print a message with colour to console.
Photon.Logging:Photon(wrapped, event) Create a "Photon" or "[Photon]" table.
Photon.Logging:Build(level) Build the message functions for a given level.

Tables

Photon.Logging.Levels Various Logging Level Enumerations
Photon.Logging.Colours Colours used in the logging library.
Photon.Logging.Phrases A table storing often used logging "phrases".


Functions

Methods
Photon.Logging.Parse(level)
Parse a string logging level (such as that from cvars.String) into a level. If it fails to parse, the default is used instead.

Parameters:

Returns:

    number Logging Level
Photon.Logging._print(...)
Print a message with colour to console.

Internal:

    This function is internal. Whilst you can call it, you probably shouldn't.

Parameters:

  • ...

See also:

Photon.Logging:Photon(wrapped, event)
Create a "Photon" or "[Photon]" table.

Parameters:

  • wrapped boolean Should the Photon be wrapped in [].
  • event string It's a secret tool that'll help us later.

Returns:

    table
Photon.Logging:Build(level)
Build the message functions for a given level. Creates the global function Photon, ie PhotonWarning Also adds the function to Photon.Logging., ie Photon.Logging.Warning

Parameters:

Tables

Photon.Logging.Levels
Various Logging Level Enumerations

Fields:

  • NONE
  • FATAL
  • ERROR
  • WARNING
  • INFO
  • DEBUG
  • ANY
Photon.Logging.Colours
Colours used in the logging library.

Fields:

  • [Photon]
  • [Photon]
  • [Photon]
  • [Photon]
  • [Photon]
  • [Photon]
  • Brand
  • Client
  • Server
  • Text
  • Disabled
Photon.Logging.Phrases
A table storing often used logging "phrases".

Fields:

  • Photon
  • Photon
generated by LDoc 1.5.0 Last updated 2023-08-22 12:06:54