Photon Documentation Repository

autorun.photon.shared.sh_logging

Photon Logging Module

Functions

SharedPhoton.Logging._print(_)Source ☍

Print a message with colour to console.

Internal

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

Parameters

  • unknown
SharedPhoton.Logging:Build(level)Source ☍

Build the message functions for a given level. Creates the global function Photon<LEVEL>, ie PhotonWarning Also adds the function to Photon.Logging.<LEVEL>, ie Photon.Logging.Warning

Parameters

  • levelany
SharedPhoton.Logging.Parse(level) → integer|unknownSource ☍

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

  • levelany

Returns

  1. integer|unknown
SharedPhoton.Logging:Photon(wrapped, event) → tableSource ☍

Create a "Photon" or "[Photon]" table.

Parameters

  • wrappedany
  • eventany

Returns

  1. table

Tables

SharedPhoton.LoggingSource ☍
SharedPhoton.Logging.ColoursSource ☍

Colours used in the logging library.

SharedPhoton.Logging.LevelsSource ☍

Various Logging Level Enumerations

SharedPhoton.Logging.PhrasesSource ☍

A table storing often used logging "phrases".

Fields

SharedPhoton.Logging.LevelSource ☍
SharedPhoton.Logging.Levels._MAXSource ☍
SharedPhoton.Logging.Levels._MINSource ☍
SharedPhoton.Logging.Levels.DEFAULTSource ☍