internal static void LogSlowQuery(DateTime logTime, string log) { if (SkipSlowQueries) { return; } string sessionid = ""; int espaceid = 0, tenantid = 0, userid = 0; if (System.Web.HttpContext.Current != null) // if inside a web application { AppInfo.GetAppInfoInformation(out espaceid, out tenantid, out sessionid, out userid); // if this is a query to get AppInfo information -> do not log if (espaceid == 0) { return; } } var logger = new OutSystems.HubEdition.RuntimePlatform.Log.GeneralLog(); logger.Write(logTime, sessionid, espaceid, tenantid, userid, log, OutSystems.HubEdition.RuntimePlatform.Log.GeneralLogType.WARNING.ToString(), "SLOWSQL", ""); }
internal static void LogSlowQuery(DateTime logTime, string log) { if (SkipSlowQueries) { return; } string sessionid = ""; int espaceid = 0, tenantid = 0, userid = 0; if (HttpContext.Current != null) // if inside a web application { AppInfo.GetAppInfoInformation(out espaceid, out tenantid, out sessionid, out userid); // if this is a query to get AppInfo information -> do not log if (espaceid == 0) { return; } } GeneralLog.StaticWrite(logTime, sessionid, espaceid, tenantid, userid, log, GeneralLogType.WARNING.ToString(), "SLOWSQL", ""); }