Extension logging async
Question
Platform Version
11.0.542.0

Hi,

we must log information from an extension.

We are thinking in log information to “General Log”, using some async function.

Can someone advise what is the best option?

This function “HubEdition.RuntimePlatform.Log.GeneralLog.Write“ is async?


 private static void LogMessage(string moduleName, string message)

{

            HubEdition.RuntimePlatform.Log.GeneralLog log = new HubEdition.RuntimePlatform.Log.GeneralLog();

            log.Write(System.DateTime.Now, AppInfo.GetAppInfo().OsContext.Session.SessionID, AppInfo.GetAppInfo().eSpaceId, AppInfo.GetAppInfo().Tenant.Id, AppInfo.GetAppInfo().OsContext.Session.UserId, message, "Info", moduleName, "0");

}

Regards

Miguel Anselmo

mvp_badge
MVP

Hi Miguel,

We use the following:

GenericExtendedActions.LogMessage(AppInfo.GetAppInfo().OsContext, "Message to log", "Source");

This logs a message in the General Log.

Hi Kilian,

GenericExtendedActions.LogMessage => is async?

Thanks

Regards

Miguel Anselmo


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.