public Log ( string name, string val, MessagePriority priority = MessagePriority.Low ) : void | ||
name | string | |
val | string | |
priority | MessagePriority | |
Результат | void |
public static void ReportNodeInfo(Tracker tracker) { tracker.Log("Info_UserId", PluginSettings.Instance.UserId); tracker.Log("Info_NodeName", PluginSettings.Instance.NodeName); var curAssembly = typeof(Program).Assembly; tracker.Log("Info_ProcessVersion", curAssembly.FullName); var res = string.Format("v{0}", typeof(CIAPI.Rpc.Client).Assembly.GetName().Version); tracker.Log("Info_CiapiVersion", res); }
private void Init() { if (!Directory.Exists(Const.WorkingAreaBinPath)) Directory.CreateDirectory(Const.WorkingAreaBinPath); if (!Directory.Exists(Const.WorkingAreaTempPath)) Directory.CreateDirectory(Const.WorkingAreaTempPath); try { lock (TrackerSync) { var settings = AppSettings.Load(); var tracker = Tracker.Create(settings.MetricsServerUrl, Const.AppName, "{APPMETRICS_ACCESS_KEY}"); _tracker = tracker; _tracker.Log("Info_UserId", settings.UserId); _tracker.Log("Info_NodeName", settings.NodeName); var curAssembly = typeof(AgentServiceClass).Assembly; _tracker.Log("Info_ProcessVersion", curAssembly.FullName); } } catch (Exception exc) { Report(exc); } }