public static void Log(string Message, OmniusLogLevel level, OmniusLogSource source = OmniusLogSource.none, Application application = null, User user = null) { switch (level) { case OmniusLogLevel.Info: new OmniusInfo(Message) { Application = application, User = user, SourceModule = source }.Save(); break; case OmniusLogLevel.Warning: new OmniusWarning(Message) { Application = application, User = user, SourceModule = source }.Save(); break; case OmniusLogLevel.Error: new OmniusException(Message) { Application = application, User = user, SourceModule = source }.Save(); break; } }
public override void InnerRun(Dictionary <string, object> vars, Dictionary <string, object> outputVars, Dictionary <string, object> InvertedInputVars, Message message) { // init COREobject core = COREobject.i; string msg = vars.ContainsKey("Message") ? (string)vars["Message"] : string.Empty; OmniusLogLevel level = vars.ContainsKey("Level") ? (OmniusLogLevel)vars["Level"] : OmniusLogLevel.Info; OmniusLog.Log(msg, level, OmniusLogSource.User, core.Application, core.User); }
public OmniusLog(string Message, Exception innerException, OmniusLogLevel level) : base(Message, innerException) { Timestamp = DateTime.UtcNow; Level = level; try { Server = HttpContext.Current.Request.Url.Authority; } catch (Exception) { } }
public static void Log(COREobject core, string Message, OmniusLogLevel Level = OmniusLogLevel.Info) { OmniusLog.Log(Message, Level, OmniusLogSource.User, core.Application, core.User); }