https://github.com/3noch/log2sql
Parses a log file and writes it to a [SQLite] database for better querying
https://github.com/3noch/log2sql
Last synced: about 1 year ago
JSON representation
Parses a log file and writes it to a [SQLite] database for better querying
- Host: GitHub
- URL: https://github.com/3noch/log2sql
- Owner: 3noch
- License: mit
- Created: 2015-10-07T14:24:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-08T22:41:14.000Z (almost 11 years ago)
- Last Synced: 2025-03-25T07:01:59.007Z (about 1 year ago)
- Language: Haskell
- Size: 146 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
log2sql
=======
Parses a log file and writes it to a [SQLite] database for better querying.
Usage
-----
`log2sql --help`
For example,
`log2sql -f myfile.log -d ";" colname1 colname2 colname3 colname4`
will parse the file `myfile.log` with four columns, separated by `;`s,
and write the output to `myfile-out.db`.
Likewise, you could do
`cat myfile.log | log2sql -d ";" colname1 colname2 colname3 colname4`
by leaving the `-f` flag off. This will write a database called
`log-data.db`.
`log2sql` will always merge superfluous colmuns into the last one.
For example, if you specify two columns but your data has three, then
`log2sql` will merge the third column into the second.
Building
--------
Install [stack](https://github.com/commercialhaskell/stack) and run `stack setup && stack build`.
License
-------
Copyright © Covenant Eyes 2015
This package is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php)
(see `LICENSE`).