Photon Bolt Engine API 1.3

Classes | Static Public Member Functions | List of all members
Photon.Bolt.Utils.BoltLog Class Reference

Provides logging capabilities to a variety of outputs More...

Classes

class  ConsoleWriter
 IWriter implementation that outputs to the Bolt console
 
class  File
 IWriter implementation that outputs to a file
 
interface  IWriter
 The interface providing log writing capabilities to an output More...
 
class  SystemOutWriter
 IWriter implementation that outputs to the system console out
 
class  UnityWriter
 IWriter implementation that outputs to Unity console
 

Static Public Member Functions

static void Add< T > (T instance)
 
static void Error (object message)
 
static void Error (string message)
 
static void Error (string message, object arg0)
 
static void Error (string message, object arg0, object arg1)
 
static void Error (string message, object arg0, object arg1, object arg2)
 
static void Error (string message, params object[] args)
 
static void Exception (Exception exception)
 
static void Info (object message)
 
static void Info (string message)
 
static void Info (string message, object arg0)
 
static void Info (string message, object arg0, object arg1)
 
static void Info (string message, object arg0, object arg1, object arg2)
 
static void Info (string message, params object[] args)
 
static void RemoveAll ()
 
static void Warn (object message)
 
static void Warn (string message)
 
static void Warn (string message, object arg0)
 
static void Warn (string message, object arg0, object arg1)
 
static void Warn (string message, object arg0, object arg1, object arg2)
 
static void Warn (string message, params object[] args)
 

Detailed Description

Provides logging capabilities to a variety of outputs

Example: Logging with different status levels.

void OwnerOnAttack(BoltEntity player, BoltEntity target) {
if(!target.IsAttached) {
BoltLog.Error("Attempting to target an entity that is not attached: {0}", target.NetworkId);
}
else {
BoltLog.Info("{0} attack on {1}", player.NetworkId, target.NetworkId);
var playerState = player.GetState<PlayerState>();
var targetState = target.GetState<PlayerState>();
targetState.HP = -= playerState.BaseDamage * playerState.DamageModMultiplier;
}
}

Member Function Documentation

◆ Add< T >()

static void Photon.Bolt.Utils.BoltLog.Add< T > ( instance)
inlinestatic
Type Constraints
T :class 
T :IWriter 

◆ Error() [1/6]

static void Photon.Bolt.Utils.BoltLog.Error ( object  message)
inlinestatic

◆ Error() [2/6]

static void Photon.Bolt.Utils.BoltLog.Error ( string  message)
inlinestatic

◆ Error() [3/6]

static void Photon.Bolt.Utils.BoltLog.Error ( string  message,
object  arg0 
)
inlinestatic

◆ Error() [4/6]

static void Photon.Bolt.Utils.BoltLog.Error ( string  message,
object  arg0,
object  arg1 
)
inlinestatic

◆ Error() [5/6]

static void Photon.Bolt.Utils.BoltLog.Error ( string  message,
object  arg0,
object  arg1,
object  arg2 
)
inlinestatic

◆ Error() [6/6]

static void Photon.Bolt.Utils.BoltLog.Error ( string  message,
params object[]  args 
)
inlinestatic

◆ Exception()

static void Photon.Bolt.Utils.BoltLog.Exception ( Exception  exception)
inlinestatic

◆ Info() [1/6]

static void Photon.Bolt.Utils.BoltLog.Info ( object  message)
inlinestatic

◆ Info() [2/6]

static void Photon.Bolt.Utils.BoltLog.Info ( string  message)
inlinestatic

◆ Info() [3/6]

static void Photon.Bolt.Utils.BoltLog.Info ( string  message,
object  arg0 
)
inlinestatic

◆ Info() [4/6]

static void Photon.Bolt.Utils.BoltLog.Info ( string  message,
object  arg0,
object  arg1 
)
inlinestatic

◆ Info() [5/6]

static void Photon.Bolt.Utils.BoltLog.Info ( string  message,
object  arg0,
object  arg1,
object  arg2 
)
inlinestatic

◆ Info() [6/6]

static void Photon.Bolt.Utils.BoltLog.Info ( string  message,
params object[]  args 
)
inlinestatic

◆ RemoveAll()

static void Photon.Bolt.Utils.BoltLog.RemoveAll ( )
inlinestatic

◆ Warn() [1/6]

static void Photon.Bolt.Utils.BoltLog.Warn ( object  message)
inlinestatic

◆ Warn() [2/6]

static void Photon.Bolt.Utils.BoltLog.Warn ( string  message)
inlinestatic

◆ Warn() [3/6]

static void Photon.Bolt.Utils.BoltLog.Warn ( string  message,
object  arg0 
)
inlinestatic

◆ Warn() [4/6]

static void Photon.Bolt.Utils.BoltLog.Warn ( string  message,
object  arg0,
object  arg1 
)
inlinestatic

◆ Warn() [5/6]

static void Photon.Bolt.Utils.BoltLog.Warn ( string  message,
object  arg0,
object  arg1,
object  arg2 
)
inlinestatic

◆ Warn() [6/6]

static void Photon.Bolt.Utils.BoltLog.Warn ( string  message,
params object[]  args 
)
inlinestatic