log-to-slack
Advanced tools
Comparing version 1.3.4 to 1.3.5
@@ -9,2 +9,6 @@ 'use strict'; | ||
if( !this.options.lineCount ){ | ||
this.options.lineCount = 50000; | ||
} | ||
this.messageList = []; | ||
@@ -17,8 +21,7 @@ this.connection = connection; | ||
apache2.prototype.icon = 'http://i.imgur.com/4cCZiwS.png'; | ||
apache2.prototype.messageCount = 100; | ||
apache2.prototype.logCommand = 'cat /var/log/apache2/access.log | grep \'" [4-5][0-9][0-9] \''; | ||
apache2.prototype.logCommand = 'tail -n LINECOUNT /var/log/apache2/access.log | grep \'" [4-5][0-9][0-9] \''; | ||
apache2.prototype.runCommand = function( command ){ | ||
var _this = this; | ||
var parsedCommand = command.replace( "\'", "'" ); | ||
var parsedCommand = command.replace( "\'", "'" ).replace( 'LINECOUNT', this.options.lineCount ); | ||
@@ -25,0 +28,0 @@ this.connection.exec( parsedCommand, function( error, stream ) { |
{ | ||
"name": "log-to-slack", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "Parse logs on remote servers and post new messages to Slack", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/kokarn/log-to-slack", |
@@ -33,6 +33,13 @@ # Log to Slack | ||
```lineCount```: The number of lines to lookback when parsing the log | ||
Example | ||
``` | ||
"lineCount": 50000 | ||
``` | ||
Default: ```500000``` | ||
```skipFiles```: Array of filenames to match and skip if found. | ||
Example | ||
``` | ||
skipFiles: [ | ||
"skipFiles": [ | ||
"robots.txt", | ||
@@ -46,3 +53,3 @@ "favicon.ico" | ||
``` | ||
skipCodes: [ | ||
"skipCodes": [ | ||
408 | ||
@@ -85,3 +92,4 @@ ] | ||
"robots.txt" | ||
] | ||
], | ||
"lineCount": 50000 | ||
} | ||
@@ -88,0 +96,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30949
521
98