public static ILoggerFactory GetLoggerFactory() { var myLoggerFactory = new MyLoggerFactory(); myLoggerFactory.DefaultLogger.LogHelper.ShowMessage = s => { AsyncFormEventBus.Raise(new AsyncFormMessageEvent(s)); }; return(_logFactory ?? (_logFactory = myLoggerFactory)); }
// Start is called before the first frame update void Start() { var endpoint = new UriEndPoint(new Uri("https://localhost:44340/rfch")); MyLoggerFactory loggerFactory = new MyLoggerFactory(); _connection = new HubConnection( new HttpConnectionFactory(new MyOptions(), loggerFactory), new JsonHubProtocol(), endpoint, new MyServiceProvider(), loggerFactory); _connection.StartAsync().ConfigureAwait(false); }
public void Clean() { MyLoggerFactory.Clear(); }
static ClassWithExistingField() { existingLogger = MyLoggerFactory.GetLogger <ClassWithExistingField>(); }