public DefaultSerializer(ILogProperties logProperties) { if (logProperties != null) { Properties = logProperties.Properties; } SerializerSettings = new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }; }
public static ILoggingBuilder AddProviderFluentd(this ILoggingBuilder loggingBuilder, ILogProperties logProperties, IEnumerable <Type> loggingSerializers) { loggingBuilder .Services .AddSingleton(logProperties) .AddSerializers(loggingSerializers); loggingBuilder .AddFluentdLogger(); return(loggingBuilder); }
/// <inheritdoc /> void IEventLogger.AddLog(ILogProperties properties, IPortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering) { // supports adding a custom string for LogType var log = new LogInfo { LogUserID = userID, LogTypeKey = logTypeKey, LogProperties = (LogProperties)properties, BypassBuffering = bypassBuffering, }; if (portalSettings != null) { log.LogPortalID = portalSettings.PortalId; log.LogPortalName = portalSettings.PortalName; } LogController.Instance.AddLog(log); }