SmartFoxAddLogListener Method |
Namespace: Sfs2X
public void AddLogListener( LogLevel logLevel, EventListenerDelegate eventListener )
void SomeMethod() { sfs.AddLogListener(LogLevel.INFO, OnInfoLogMessage); sfs.AddLogListener(LogLevel.WARN, OnWarnLogMessage); } void OnInfoLogMessage(BaseEvent evt) { string message = (string)evt.Params["message"]; Console.WriteLine("[SFS2X INFO] " + message); // .Net / Unity System.Diagnostics.Debug.WriteLine("[SFS2X INFO] " + message); // UWP } void OnWarnLogMessage(BaseEvent evt) { string message = (string)evt.Params["message"]; Console.WriteLine("[SFS2X WARN] " + message); // .Net / Unity System.Diagnostics.Debug.WriteLine("[SFS2X WARN] " + message); // UWP }