macklog 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11f3e08e88c572972f36d55e2768c36f46ac686d
4
- data.tar.gz: 2d9080d38c1816743260590389309c47d4227f1a
3
+ metadata.gz: a62fda172422a1b1139963a312898ac0f630159b
4
+ data.tar.gz: 93cce5305c530eb41283a5aaa2bf594c9d3f111a
5
5
  SHA512:
6
- metadata.gz: b4fa897ce9593fc0d42e97fbf54e332c622c0ce26d29ea8f811d339f27d126f0b81067b6bfc45166770a885a7ff8598a4bce8e30131fea13258afe1a58c6677f
7
- data.tar.gz: 5debed727f96fbfdda277a5470bed89c87ba0736fcabbe3f641e2141051f81bdc142274d9f4f670c5feef3ed7758fc88ad0bb377fa24b68a5047fd27528bd5eb
6
+ metadata.gz: 04d1ff56fafb4e2b4adff8f8590e9fa906baccba03b0787c5fa8341585d7e26a2ed4e31a97d8033eac4098a727d278b03adca332c569c73be64fbd04e5cd11c4
7
+ data.tar.gz: 500d341e87ed5c77bda24669238abaec1fd8eaaf0ea804c3ed76702b6d1b3ceff00c0be2821f81b89b47294c279efe93f5bd0f1efb98845c400cb9d937884702
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- macklog (0.1.3)
4
+ macklog (0.1.4)
5
5
  thor
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -21,6 +21,17 @@ gem 'macklog'
21
21
  command = "macklog -f /var/log/httpd/error.log -w fatal -i"
22
22
  ```
23
23
 
24
+ ### options
25
+ ```
26
+ -f : 対象ファイル
27
+ -w : 対象キーワード
28
+ -i : 大文字小文字を区別しない
29
+ ```
30
+
31
+ 同じアラートを複数回通知しないために、履歴を/tmpディレクトリ配下のファイルで行っています。
32
+ /tmp以外で行う場合は、`export MACKLOG_TMP=/var/tmp`のように環境変数に指定を行って下さい。
33
+
34
+
24
35
  ## Contributing
25
36
 
26
37
  1. Fork it ( https://github.com/[my-github-username]/macklog/fork )
@@ -39,7 +39,7 @@ module Macklog
39
39
  end
40
40
 
41
41
  def notified?(file_path, record)
42
- tmp_path = ENV["macklog_tmp"] ? ENV["macklog_tmp"] : "/tmp"
42
+ tmp_path = ENV["MACKLOG_TMP"] ? ENV["MACKLOG_TMP"] : "/tmp"
43
43
  tmp_path << "/macklog_#{File.basename(file_path, '.*')}.tmp"
44
44
 
45
45
  unless File.exist?(tmp_path) && File.readlines(tmp_path).map(&:chomp).include?(record)
@@ -1,3 +1,3 @@
1
1
  module Macklog
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macklog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazuhiko yamahsita