diff --git a/README.md b/README.md index 2296605..f2b7256 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ create formatted messages or use directly let rfc5424 = new SyslogPro.RFC5424({ applicationName: 'MyApp', timestamp: true, - encludeStructuredData: true + includeStructuredData: true color: true, extendedColor: true, server: { diff --git a/docs/api.md b/docs/api.md index 6e7600e..fdd1cc0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -65,7 +65,7 @@ formatting classes so that they may run independently. * [.timestampUTC](#module_SyslogPro..RFC5424+timestampUTC) : boolean * [.timestampTZ](#module_SyslogPro..RFC5424+timestampTZ) : boolean * [.timestampMS](#module_SyslogPro..RFC5424+timestampMS) : boolean - * [.encludeStructuredData](#module_SyslogPro..RFC5424+encludeStructuredData) : boolean + * [.includeStructuredData](#module_SyslogPro..RFC5424+includeStructuredData) : boolean * [.utf8BOM](#module_SyslogPro..RFC5424+utf8BOM) : boolean * [.color](#module_SyslogPro..RFC5424+color) : boolean * [.extendedColor](#module_SyslogPro..RFC5424+extendedColor) : boolean @@ -636,7 +636,7 @@ fashion where new messages are written to the class as needed. * [.timestampUTC](#module_SyslogPro..RFC5424+timestampUTC) : boolean * [.timestampTZ](#module_SyslogPro..RFC5424+timestampTZ) : boolean * [.timestampMS](#module_SyslogPro..RFC5424+timestampMS) : boolean - * [.encludeStructuredData](#module_SyslogPro..RFC5424+encludeStructuredData) : boolean + * [.includeStructuredData](#module_SyslogPro..RFC5424+includeStructuredData) : boolean * [.utf8BOM](#module_SyslogPro..RFC5424+utf8BOM) : boolean * [.color](#module_SyslogPro..RFC5424+color) : boolean * [.extendedColor](#module_SyslogPro..RFC5424+extendedColor) : boolean @@ -674,7 +674,7 @@ Construct a new RFC5424 formatted Syslog object with user options | [options.timestampUTC] | boolean | false | RFC standard is for local time | | [options.timestampMS] | boolean | false | Timestamp with ms resolution | | [options.timestampTZ] | boolean | true | Should the timestamp included time zone | -| [options.encludeStructuredData] | boolean | false | Included any provided structured data | +| [options.includeStructuredData] | boolean | false | Included any provided structured data | | [options.utf8BOM] | boolean | true | Included the UTF8 | | [options.color] | boolean | false | Included the UTF8 | | [options.extendedColor] | boolean | false | Included the UTF8 encoding tag with syslog message text | @@ -705,9 +705,9 @@ Construct a new RFC5424 formatted Syslog object with user options #### rfC5424.timestampMS : boolean **Kind**: instance property of [RFC5424](#module_SyslogPro..RFC5424) - + -#### rfC5424.encludeStructuredData : boolean +#### rfC5424.includeStructuredData : boolean **Kind**: instance property of [RFC5424](#module_SyslogPro..RFC5424) diff --git a/docs/docco/README.md b/docs/docco/README.md index 1856f2f..6b064e5 100644 --- a/docs/docco/README.md +++ b/docs/docco/README.md @@ -1267,7 +1267,7 @@ class RFC5424 { * resolution * @param {boolean} [options.timestampTZ=true] - Should the timestamp * included time zone - * @param {boolean} [options.encludeStructuredData=false] - Included + * @param {boolean} [options.includeStructuredData=false] - Included * any provided structured data * @param {boolean} [options.utf8BOM=true] - Included the UTF8 * @param {boolean} [options.color=false] - Included the UTF8 @@ -1333,11 +1333,11 @@ class RFC5424 { } else { this.timestampMS = false; } - if (options.encludeStructuredData) { + if (options.includeStructuredData) { /** @type {boolean} */ - this.encludeStructuredData = true; + this.includeStructuredData = true; } else { - this.encludeStructuredData = false; + this.includeStructuredData = false; } if (typeof options.utf8BOM === 'undefined' || options.utf8BOM) { /** @type {boolean} */ @@ -1740,7 +1740,7 @@ Build Structured Data string ``` let structuredData = '-'; const sdElementCount = msgStructuredData.length; - if (this.encludeStructuredData && sdElementCount > 0) { + if (this.includeStructuredData && sdElementCount > 0) { let sdElementNames = []; let sdElements = []; const sdElementNameRegEx = /(\[)(\S*)(\s|\])/; diff --git a/docs/docco/index.html b/docs/docco/index.html index 4adfe23..e9986e9 100644 --- a/docs/docco/index.html +++ b/docs/docco/index.html @@ -1275,7 +1275,7 @@ uses BSD timeformat

* resolution * @param {boolean} [options.timestampTZ=true] - Should the timestamp * included time zone - * @param {boolean} [options.encludeStructuredData=false] - Included + * @param {boolean} [options.includeStructuredData=false] - Included * any provided structured data * @param {boolean} [options.utf8BOM=true] - Included the UTF8 * @param {boolean} [options.color=false] - Included the UTF8 @@ -1341,11 +1341,11 @@ uses BSD timeformat

} else { this.timestampMS = false; } - if (options.encludeStructuredData) { + if (options.includeStructuredData) { /** @type {boolean} */ - this.encludeStructuredData = true; + this.includeStructuredData = true; } else { - this.encludeStructuredData = false; + this.includeStructuredData = false; } if (typeof options.utf8BOM === 'undefined' || options.utf8BOM) { /** @type {boolean} */ @@ -1743,7 +1743,7 @@ uses BSD timeformat

      let structuredData = '-';
       const sdElementCount = msgStructuredData.length;
-      if (this.encludeStructuredData && sdElementCount > 0) {
+      if (this.includeStructuredData && sdElementCount > 0) {
         let sdElementNames = [];
         let sdElements = [];
         const sdElementNameRegEx = /(\[)(\S*)(\s|\])/;
diff --git a/docs/index.html b/docs/index.html index 78d3fb5..bf8eca7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -96,7 +96,7 @@ create formatted messages or use directly

  let rfc5424 = new SyslogPro.RFC5424({
     applicationName: 'MyApp',
     timestamp: true,
-    encludeStructuredData: true
+    includeStructuredData: true
     color: true,
     extendedColor: true,
     server: {
diff --git a/docs/index.js.html b/docs/index.js.html
index b6594f7..2818a26 100644
--- a/docs/index.js.html
+++ b/docs/index.js.html
@@ -1091,7 +1091,7 @@ class RFC5424 {
    *    resolution
    * @param {boolean} [options.timestampTZ=true] - Should the timestamp
    *    included time zone
-   * @param {boolean} [options.encludeStructuredData=false] - Included
+   * @param {boolean} [options.includeStructuredData=false] - Included
    *    any provided structured data
    * @param {boolean} [options.utf8BOM=true] - Included the UTF8
    * @param {boolean} [options.color=false] - Included the UTF8
@@ -1157,11 +1157,11 @@ class RFC5424 {
     } else {
       this.timestampMS = false;
     }
-    if (options.encludeStructuredData) {
+    if (options.includeStructuredData) {
       /** @type {boolean} */
-      this.encludeStructuredData = true;
+      this.includeStructuredData = true;
     } else {
-      this.encludeStructuredData = false;
+      this.includeStructuredData = false;
     }
     if (typeof options.utf8BOM === 'undefined' || options.utf8BOM) {
       /** @type {boolean} */
@@ -1494,7 +1494,7 @@ class RFC5424 {
       // Build Structured Data string
       let structuredData = '-';
       const sdElementCount = msgStructuredData.length;
-      if (this.encludeStructuredData && sdElementCount > 0) {
+      if (this.includeStructuredData && sdElementCount > 0) {
         let sdElementNames = [];
         let sdElements = [];
         const sdElementNameRegEx = /(\[)(\S*)(\s|\])/;
diff --git a/docs/module-SyslogPro-RFC5424.html b/docs/module-SyslogPro-RFC5424.html
index b4ed0ad..da2d86c 100644
--- a/docs/module-SyslogPro-RFC5424.html
+++ b/docs/module-SyslogPro-RFC5424.html
@@ -467,7 +467,7 @@ fashion where new messages are written to the class as needed.
 
         
             
-                encludeStructuredData
+                includeStructuredData
             
 
             
@@ -1427,7 +1427,7 @@ fashion where new messages are written to the class as needed.
 
         
             
-

encludeStructuredData :boolean

+

includeStructuredData :boolean

diff --git a/index.js b/index.js index c811e0a..8368146 100644 --- a/index.js +++ b/index.js @@ -1052,7 +1052,7 @@ class RFC5424 { * resolution * @param {boolean} [options.timestampTZ=true] - Should the timestamp * included time zone - * @param {boolean} [options.encludeStructuredData=false] - Included + * @param {boolean} [options.includeStructuredData=false] - Included * any provided structured data * @param {boolean} [options.utf8BOM=true] - Included the UTF8 * @param {boolean} [options.color=false] - Included the UTF8 @@ -1122,11 +1122,11 @@ class RFC5424 { } else { this.timestampMS = false; } - if (options.encludeStructuredData) { + if (options.includeStructuredData || options.encludeStructuredData) { /** @type {boolean} */ - this.encludeStructuredData = true; + this.includeStructuredData = true; } else { - this.encludeStructuredData = false; + this.includeStructuredData = false; } if (typeof options.utf8BOM === 'undefined' || options.utf8BOM) { /** @type {boolean} */ @@ -1459,7 +1459,7 @@ class RFC5424 { // Build Structured Data string let structuredData = '-'; const sdElementCount = msgStructuredData.length; - if (this.encludeStructuredData && sdElementCount > 0) { + if (this.includeStructuredData && sdElementCount > 0) { let sdElementNames = []; let sdElements = []; const sdElementNameRegEx = /(\[)(\S*)(\s|\])/; diff --git a/tests/syslog.test.js b/tests/syslog.test.js index b501396..af590bf 100644 --- a/tests/syslog.test.js +++ b/tests/syslog.test.js @@ -373,7 +373,7 @@ describe('RFC5424 Class Tests', () => { timestampUTC: true, timestampTZ: false, timestampMS: true, - encludeStructuredData: true, + includeStructuredData: true, colors: { emergencyColor: 30, alertColor: 30, @@ -428,7 +428,7 @@ describe('RFC5424 Class Tests', () => { let resultMsg = /<190>1 \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2} /; expect(result).toMatch(resultMsg); let rfc5424 = new SyslogPro.RFC5424({ - encludeStructuredData: true, + includeStructuredData: true, color: true, extendedColor: false, timestamp: true,