// Implement ICanCreateJsonFields public virtual void AddJsonFields(IList <string> jsonFields, Dictionary <string, string> appenderNames, Func <string, string> virtualToAbsoluteFunc) { var stringValue = new StringValue(); JavaScriptHelpers.AddJsonField(jsonFields, FieldLevel, level, new LevelValue()); JavaScriptHelpers.AddJsonField(jsonFields, "ipRegex", ipRegex, stringValue); JavaScriptHelpers.AddJsonField(jsonFields, "userAgentRegex", userAgentRegex, stringValue); JavaScriptHelpers.AddJsonField(jsonFields, "disallow", disallow, stringValue); }
// Implement ICanCreateJsonFields public override void AddJsonFields(IList <string> jsonFields, Dictionary <string, string> appenderNames, Func <string, string> virtualToAbsoluteFunc) { var levelValue = new LevelValue(); JavaScriptHelpers.AddJsonField(jsonFields, FieldSendWithBufferLevel, sendWithBufferLevel, levelValue); JavaScriptHelpers.AddJsonField(jsonFields, FieldStoreInBufferLevel, storeInBufferLevel, levelValue); JavaScriptHelpers.AddJsonField(jsonFields, FieldBufferSize, bufferSize); JavaScriptHelpers.AddJsonField(jsonFields, FieldBatchSize, batchSize); base.AddJsonFields(jsonFields, appenderNames, virtualToAbsoluteFunc); }
// Implement ICanCreateJsonFields public void AddJsonFields(IList <string> jsonFields, Dictionary <string, string> appenderNames, Func <string, string> virtualToAbsoluteFunc) { try { JavaScriptHelpers.AddJsonField(jsonFields, FieldEnabled, enabled); JavaScriptHelpers.AddJsonField(jsonFields, FieldMaxMessages, maxMessages); JavaScriptHelpers.AddJsonField(jsonFields, FieldDefaultAjaxUrl, defaultAjaxUrl, new UrlValue(virtualToAbsoluteFunc)); } catch (Exception e) { string displayName = "jsnlog library"; throw new ConfigurationException(displayName, e); } }
// Implement ICanCreateJsonFields public override void AddJsonFields(IList <string> jsonFields, Dictionary <string, string> appenderNames, Func <string, string> virtualToAbsoluteFunc) { JavaScriptHelpers.AddJsonField(jsonFields, FieldAppenders, appenders, new AppendersValue(appenderNames)); if (onceOnlies != null) { // Note that regex on a onceOnly object can be null (that is, not given in the config). // This allows user to specify an empty list of onceOnlies, to override the onceOnlies of // the parent logger. See http://jsnlog.com/Documentation/WebConfig/JSNLog/Logger JavaScriptHelpers.AddJsonField(jsonFields, FieldOnceOnly, onceOnlies.Select(o => o.regex), new StringValue()); } base.AddJsonFields(jsonFields, appenderNames, virtualToAbsoluteFunc); }
// Implement ICanCreateJsonFields public override void AddJsonFields(IList <string> jsonFields, Dictionary <string, string> appenderNames, Func <string, string> virtualToAbsoluteFunc) { JavaScriptHelpers.AddJsonField(jsonFields, FieldUrl, url, new UrlValue(virtualToAbsoluteFunc)); base.AddJsonFields(jsonFields, appenderNames, virtualToAbsoluteFunc); }