pull/1/head
unknown 5 years ago
parent 9a7d3d6a36
commit 697b42ab2c

@ -1,5 +1,4 @@
using System.Collections.Generic;
using ZeroLevel.Models;
using ZeroLevel.Models;
using ZeroLevel.Network;
using ZeroLevel.Services.Applications;
@ -19,9 +18,9 @@ namespace ZeroLevel.Discovery
{
var routeTable = new RouteTable();
Injector.Default.Register<RouteTable>(routeTable);
var socketPort = Configuration.Default.First<int>("socketport");
_exInbox = UseHost(socketPort);
_exInbox.RegisterInbox<IEnumerable<ServiceEndpointsInfo>>("services", (_) => routeTable.Get());
var servicePort = Configuration.Default.First<int>("port");
_exInbox = UseHost(servicePort);
_exInbox.RegisterInbox("services", (_) => routeTable.Get());
_exInbox.RegisterInbox<ZeroServiceInfo, InvokeResult>("register", (client, info) => routeTable.Append(info, client));
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="socketport" value="5012"/>
<add key="port" value="5012"/>
<add key="log" value="logs"/>
<add key="console" value="true"/>
</appSettings>

@ -156,10 +156,15 @@ namespace ZeroLevel
#endregion Delegate logger
#region Console
private static bool _console_log_enabled = false;
public static void AddConsoleLogger(LogLevel level = LogLevel.Standart)
{
AddLogger(new ConsoleLogger(), level);
if (_console_log_enabled == false)
{
AddLogger(new ConsoleLogger(), level);
_console_log_enabled = true;
}
}
#endregion Console

Loading…
Cancel
Save

Powered by TurnKey Linux.