log2json 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
data/bin/tail CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'log2json'
3
- s.version = '0.1.20'
3
+ s.version = '0.1.21'
4
4
  s.summary = "Read, filter and ship logs. ie, poor man's roll-your-own, light-weight logstash replacement."
5
5
  s.description = IO.read(File.join(File.dirname(__FILE__), 'README'))
6
6
  s.authors = ['Jack Kuan']
@@ -1,26 +1,26 @@
1
- 82a83,85
2
- > /* Size of the array that stores the -n option values. */
3
- > #define MAX_FILE_SKIP_LINES 256
4
- >
5
- 183a187,189
6
- > /* Stores the number of lines to skip from the start for each file. */
7
- > static int n_units_argv[MAX_FILE_SKIP_LINES];
8
- >
9
- 1049a1056,1057
10
- > if (print_headers)
11
- > printf ("==> %s <== [new_file]\n", pretty_name (f));
12
- 1171a1180,1181
13
- > if (print_headers)
14
- > printf ("==> %s <== [truncated]\n", name);
15
- 1286a1297,1298
16
- > if (print_headers)
17
- > printf ("==> %s <== [truncated]\n", name);
18
- 1917a1930
19
- > int n_units_argc = 0;
20
- 1948a1962,1963
21
- > if (n_units_argc < MAX_FILE_SKIP_LINES)
22
- > n_units_argv[n_units_argc++] = *n_units;
23
- 2163c2178
24
- < ok &= tail_file (&F[i], n_units);
1
+ 83,85d82
2
+ < /* Size of the array that stores the -n option values. */
3
+ < #define MAX_FILE_SKIP_LINES 256
4
+ <
5
+ 187,189d183
6
+ < /* Stores the number of lines to skip from the start for each file. */
7
+ < static int n_units_argv[MAX_FILE_SKIP_LINES];
8
+ <
9
+ 1056,1057d1049
10
+ < if (print_headers)
11
+ < printf ("==> %s <== [new_file]\n", pretty_name (f));
12
+ 1180,1181d1171
13
+ < if (print_headers)
14
+ < printf ("==> %s <== [truncated]\n", name);
15
+ 1297,1298d1286
16
+ < if (print_headers)
17
+ < printf ("==> %s <== [truncated]\n", name);
18
+ 1930d1917
19
+ < int n_units_argc = 0;
20
+ 1962,1963d1948
21
+ < if (n_units_argc < MAX_FILE_SKIP_LINES)
22
+ < n_units_argv[n_units_argc++] = *n_units > 0 ? *n_units - 1 : 0;
23
+ 2178c2163
24
+ < ok &= tail_file (&F[i], i < MAX_FILE_SKIP_LINES ? n_units_argv[i] : n_units);
25
25
  ---
26
- > ok &= tail_file (&F[i], i < MAX_FILE_SKIP_LINES ? n_units_argv[i] : n_units);
26
+ > ok &= tail_file (&F[i], n_units);
data/src/tail.c CHANGED
@@ -1960,7 +1960,7 @@ parse_options (int argc, char **argv,
1960
1960
  : _("invalid number of bytes")));
1961
1961
  }
1962
1962
  if (n_units_argc < MAX_FILE_SKIP_LINES)
1963
- n_units_argv[n_units_argc++] = *n_units;
1963
+ n_units_argv[n_units_argc++] = *n_units > 0 ? *n_units - 1 : 0;
1964
1964
  }
1965
1965
  break;
1966
1966
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log2json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-06 00:00:00.000000000 Z
12
+ date: 2013-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jls-grok