Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5506a12
Showing
9 changed files
with
607 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,104 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
|
|||
<head> | |||
<meta charset='utf-8' /> | |||
<meta http-equiv="X-UA-Compatible" content="chrome=1" /> | |||
<meta name="description" content="Hunter : Hunter hunts for a pattern in your log files" /> | |||
|
|||
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css"> | |||
|
|||
<title>Hunter</title> | |||
</head> | |||
|
|||
<body> | |||
|
|||
<!-- HEADER --> | |||
<div id="header_wrap" class="outer"> | |||
<header class="inner"> | |||
<a id="forkme_banner" href="https://github.com/garethrees/hunter">Fork Me on GitHub</a> | |||
|
|||
<h1 id="project_title">Hunter</h1> | |||
<h2 id="project_tagline">Hunter hunts for a pattern in your log files</h2> | |||
|
|||
<section id="downloads"> | |||
<a class="zip_download_link" href="https://github.com/garethrees/hunter/zipball/master">Download this project as a .zip file</a> | |||
<a class="tar_download_link" href="https://github.com/garethrees/hunter/tarball/master">Download this project as a tar.gz file</a> | |||
</section> | |||
</header> | |||
</div> | |||
|
|||
<!-- MAIN CONTENT --> | |||
<div id="main_content_wrap" class="outer"> | |||
<section id="main_content" class="inner"> | |||
<h1>Search for a pattern in your log files</h1> | |||
|
|||
<p>I generally use a tracking gif in the mass emails I send out to get a rough idea of the open rate. It's not a small task to open each log file, filter it and then count each occurance of the gif.</p> | |||
|
|||
<p>Hunter does this for you!</p> | |||
|
|||
<p><strong>WARNING:</strong> Hunter has <strong>no tests</strong>. This was thrown together, so use with caution. Contributions are very welcome.</p> | |||
|
|||
<h2>How to Use</h2> | |||
|
|||
<h3>Install</h3> | |||
|
|||
<pre><code> gem install hunter | |||
</code></pre> | |||
|
|||
<h3>Use</h3> | |||
|
|||
<p>Create a new hunt for the string you want to match:</p> | |||
|
|||
<pre><code> hunt = Hunter::Hunt.new('/images/email/tracking.gif') | |||
</code></pre> | |||
|
|||
<h4>Look in the current log</h4> | |||
|
|||
<pre><code> hunt.look_in('/var/log/httpd/access.log') | |||
</code></pre> | |||
|
|||
<h4>Look in an archived log</h4> | |||
|
|||
<pre><code> hunt.look_in_archived('/var/log/httpd/log_archive/access.log.1.gz') | |||
</code></pre> | |||
|
|||
<h4>Look through a folder of archived logs</h4> | |||
|
|||
<pre><code> hunt.look_through_archive('/var/log/httpd/log_archive') | |||
</code></pre> | |||
|
|||
<h4>Look through a folder of archived logs for a specific log type</h4> | |||
|
|||
<pre><code> hunt.look_through_archive('/var/log/httpd/log_archive', 'access.log') | |||
</code></pre> | |||
|
|||
<h2>Known Issues</h2> | |||
|
|||
<ul> | |||
<li>"Archived" means with the file extension <code>.gz</code> – no other compression formats are supported</li> | |||
<li> | |||
<code>look_through_archive()</code> relies on your log appending a digit after the original filename and then compressing to <code>.gz</code> | |||
|
|||
<ul> | |||
<li>e.g. <code>access.log</code> becomes <code>access.log.1.gz</code> | |||
</li> | |||
</ul> | |||
</li> | |||
<li><strong>There are no tests</strong></li> | |||
</ul> | |||
</section> | |||
</div> | |||
|
|||
<!-- FOOTER --> | |||
<div id="footer_wrap" class="outer"> | |||
<footer class="inner"> | |||
<p class="copyright">Hunter maintained by <a href="https://github.com/garethrees">garethrees</a></p> | |||
<p>Published with <a href="http://pages.github.com">GitHub Pages</a></p> | |||
</footer> | |||
</div> | |||
|
|||
|
|||
|
|||
</body> | |||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
console.log('This would be the main JS file.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
{"name":"Hunter","body":"# Search for a pattern in your log files\r\n\r\nI generally use a tracking gif in the mass emails I send out to get a rough idea of the open rate. It's not a small task to open each log file, filter it and then count each occurance of the gif.\r\n\r\nHunter does this for you!\r\n\r\n**WARNING:** Hunter has <u>**no tests**</u>. This was thrown together, so use with caution. Contributions are very welcome.\r\n\r\n## How to Use\r\n\r\n### Install\r\n\r\n\t\tgem install hunter\r\n\r\n### Use\r\n\r\nCreate a new hunt for the string you want to match:\r\n\r\n\t\thunt = Hunter::Hunt.new('/images/email/tracking.gif')\r\n\r\n#### Look in the current log\r\n\r\n\t\thunt.look_in('/var/log/httpd/access.log')\r\n\r\n#### Look in an archived log\r\n\r\n\t\thunt.look_in_archived('/var/log/httpd/log_archive/access.log.1.gz')\r\n\r\n#### Look through a folder of archived logs\r\n\r\n\t\thunt.look_through_archive('/var/log/httpd/log_archive')\r\n\r\n#### Look through a folder of archived logs for a specific log type\r\n\r\n\t\thunt.look_through_archive('/var/log/httpd/log_archive', 'access.log')\r\n\r\n## Known Issues\r\n\r\n- \"Archived\" means with the file extension `.gz` – no other compression formats are supported\r\n- `look_through_archive()` relies on your log appending a digit after the original filename and then compressing to `.gz`\r\n\t* e.g. `access.log` becomes `access.log.1.gz`\r\n- **There are no tests**","tagline":"Hunter hunts for a pattern in your log files","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,70 @@ | |||
.highlight .hll { background-color: #ffffcc } | |||
.highlight { background: #f0f3f3; } | |||
.highlight .c { color: #0099FF; font-style: italic } /* Comment */ | |||
.highlight .err { color: #AA0000; background-color: #FFAAAA } /* Error */ | |||
.highlight .k { color: #006699; font-weight: bold } /* Keyword */ | |||
.highlight .o { color: #555555 } /* Operator */ | |||
.highlight .cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ | |||
.highlight .cp { color: #009999 } /* Comment.Preproc */ | |||
.highlight .c1 { color: #0099FF; font-style: italic } /* Comment.Single */ | |||
.highlight .cs { color: #0099FF; font-weight: bold; font-style: italic } /* Comment.Special */ | |||
.highlight .gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ | |||
.highlight .ge { font-style: italic } /* Generic.Emph */ | |||
.highlight .gr { color: #FF0000 } /* Generic.Error */ | |||
.highlight .gh { color: #003300; font-weight: bold } /* Generic.Heading */ | |||
.highlight .gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ | |||
.highlight .go { color: #AAAAAA } /* Generic.Output */ | |||
.highlight .gp { color: #000099; font-weight: bold } /* Generic.Prompt */ | |||
.highlight .gs { font-weight: bold } /* Generic.Strong */ | |||
.highlight .gu { color: #003300; font-weight: bold } /* Generic.Subheading */ | |||
.highlight .gt { color: #99CC66 } /* Generic.Traceback */ | |||
.highlight .kc { color: #006699; font-weight: bold } /* Keyword.Constant */ | |||
.highlight .kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ | |||
.highlight .kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ | |||
.highlight .kp { color: #006699 } /* Keyword.Pseudo */ | |||
.highlight .kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ | |||
.highlight .kt { color: #007788; font-weight: bold } /* Keyword.Type */ | |||
.highlight .m { color: #FF6600 } /* Literal.Number */ | |||
.highlight .s { color: #CC3300 } /* Literal.String */ | |||
.highlight .na { color: #330099 } /* Name.Attribute */ | |||
.highlight .nb { color: #336666 } /* Name.Builtin */ | |||
.highlight .nc { color: #00AA88; font-weight: bold } /* Name.Class */ | |||
.highlight .no { color: #336600 } /* Name.Constant */ | |||
.highlight .nd { color: #9999FF } /* Name.Decorator */ | |||
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ | |||
.highlight .ne { color: #CC0000; font-weight: bold } /* Name.Exception */ | |||
.highlight .nf { color: #CC00FF } /* Name.Function */ | |||
.highlight .nl { color: #9999FF } /* Name.Label */ | |||
.highlight .nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ | |||
.highlight .nt { color: #330099; font-weight: bold } /* Name.Tag */ | |||
.highlight .nv { color: #003333 } /* Name.Variable */ | |||
.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ | |||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */ | |||
.highlight .mf { color: #FF6600 } /* Literal.Number.Float */ | |||
.highlight .mh { color: #FF6600 } /* Literal.Number.Hex */ | |||
.highlight .mi { color: #FF6600 } /* Literal.Number.Integer */ | |||
.highlight .mo { color: #FF6600 } /* Literal.Number.Oct */ | |||
.highlight .sb { color: #CC3300 } /* Literal.String.Backtick */ | |||
.highlight .sc { color: #CC3300 } /* Literal.String.Char */ | |||
.highlight .sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ | |||
.highlight .s2 { color: #CC3300 } /* Literal.String.Double */ | |||
.highlight .se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ | |||
.highlight .sh { color: #CC3300 } /* Literal.String.Heredoc */ | |||
.highlight .si { color: #AA0000 } /* Literal.String.Interpol */ | |||
.highlight .sx { color: #CC3300 } /* Literal.String.Other */ | |||
.highlight .sr { color: #33AAAA } /* Literal.String.Regex */ | |||
.highlight .s1 { color: #CC3300 } /* Literal.String.Single */ | |||
.highlight .ss { color: #FFCC33 } /* Literal.String.Symbol */ | |||
.highlight .bp { color: #336666 } /* Name.Builtin.Pseudo */ | |||
.highlight .vc { color: #003333 } /* Name.Variable.Class */ | |||
.highlight .vg { color: #003333 } /* Name.Variable.Global */ | |||
.highlight .vi { color: #003333 } /* Name.Variable.Instance */ | |||
.highlight .il { color: #FF6600 } /* Literal.Number.Integer.Long */ | |||
|
|||
.type-csharp .highlight .k { color: #0000FF } | |||
.type-csharp .highlight .kt { color: #0000FF } | |||
.type-csharp .highlight .nf { color: #000000; font-weight: normal } | |||
.type-csharp .highlight .nc { color: #2B91AF } | |||
.type-csharp .highlight .nn { color: #000000 } | |||
.type-csharp .highlight .s { color: #A31515 } | |||
.type-csharp .highlight .sc { color: #A31515 } |
Oops, something went wrong.