Photon Bolt Engine API
Networking Middleware
Classes | Static Public Member Functions | List of all members
BoltLog Class Reference

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

Classes

class  Console
 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  SystemOut
 IWriter implementation that outputs to the system console out
 
class  Unity
 IWriter implementation that outputs to Unity console
 

Static Public Member Functions

static void RemoveAll ()
 
static void Add< T > (T instance)
 
static void Info (string message)
 
static void Info (object 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 Warn (string message)
 
static void Warn (object 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)
 
static void Error (string message)
 
static void Error (object 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)
 

Detailed Description

Provides logging capabilities to a variety of outputs

Example: Logging with different status levels.

1 void OwnerOnAttack(BoltEntity player, BoltEntity target) {
2  if(!target.isAttached) {
3  BoltLog.Error("Attempting to target an entity that is not attached: {0}", target.networkId);
4  }
5  else {
6  BoltLog.Info("{0} attack on {1}", player.networkId, target.networkId);
7 
8  var playerState = player.GetState<PlayerState>();
9  var targetState = target.GetState<PlayerState>();
10 
11  using (var mod = targetState.Modify()) {
12  mod.HP -= playerState.BaseDamage * playerState.DamageModMultiplier;
13  }
14  }
15 }

Member Function Documentation

static void BoltLog.Add< T > ( instance)
inlinestatic
Type Constraints
T :class 
T :IWriter 
static void BoltLog.Error ( string  message)
inlinestatic
static void BoltLog.Error ( object  message)
inlinestatic
static void BoltLog.Error ( string  message,
object  arg0 
)
inlinestatic
static void BoltLog.Error ( string  message,
object  arg0,
object  arg1 
)
inlinestatic
static void BoltLog.Error ( string  message,
object  arg0,
object  arg1,
object  arg2 
)
inlinestatic
static void BoltLog.Error ( string  message,
params object[]  args 
)
inlinestatic
static void BoltLog.Exception ( Exception  exception)
inlinestatic
static void BoltLog.Info ( string  message)
inlinestatic
static void BoltLog.Info ( object  message)
inlinestatic
static void BoltLog.Info ( string  message,
object  arg0 
)
inlinestatic
static void BoltLog.Info ( string  message,
object  arg0,
object  arg1 
)
inlinestatic
static void BoltLog.Info ( string  message,
object  arg0,
object  arg1,
object  arg2 
)
inlinestatic
static void BoltLog.Info ( string  message,
params object[]  args 
)
inlinestatic
static void BoltLog.RemoveAll ( )
inlinestatic
static void BoltLog.Warn ( string  message)
inlinestatic
static void BoltLog.Warn ( object  message)
inlinestatic
static void BoltLog.Warn ( string  message,
object  arg0 
)
inlinestatic
static void BoltLog.Warn ( string  message,
object  arg0,
object  arg1 
)
inlinestatic
static void BoltLog.Warn ( string  message,
object  arg0,
object  arg1,
object  arg2 
)
inlinestatic
static void BoltLog.Warn ( string  message,
params object[]  args 
)
inlinestatic