public static EzyLogger getLogger(object name)
        {
            EzyLogger logger = null;

            if (loggers.ContainsKey(name))
            {
                logger = loggers[name];
            }
            else
            {
                lock (loggers)
                {
                    if (loggers.ContainsKey(name))
                    {
                        logger = loggers[name];
                    }
                    else
                    {
                        logger        = loggerSupply(name);
                        loggers[name] = logger;
                    }
                }
            }
            return(logger);
        }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        // Enable EzyLogger
        EzyLoggerFactory.setLoggerSupply(type => new UnityLogger(type));
        logger = EzyLoggerFactory.getLogger <SocketInitializer>();

        // Set up socket client
        var socketProxy = SocketProxy.getInstance();

        client = socketProxy.setup(host, port);
    }
Esempio n. 3
0
 public EzyTcpClient(EzyClientConfig config)
 {
     this.config             = config;
     this.name               = config.getClientName();
     this.status             = EzyConnectionStatus.NULL;
     this.status             = EzyConnectionStatus.NULL;
     this.pingManager        = new EzySimplePingManager(config.getPing());
     this.pingSchedule       = new EzyPingSchedule(this);
     this.handlerManager     = new EzySimpleHandlerManager(this);
     this.networkStatistics  = new EzySimpleStatistics();
     this.requestSerializer  = new EzySimpleRequestSerializer();
     this.settingUp          = new EzySimpleSetup(handlerManager);
     this.unloggableCommands = newUnloggableCommands();
     this.socketClient       = newSocketClient();
     this.logger             = EzyLoggerFactory.getLogger(GetType());
 }
Esempio n. 4
0
 public EzyLoggable()
 {
     this.logger = EzyLoggerFactory.getLogger(GetType());
 }