Thor77
65a8379261
Use pendulum instead of plain datetime
...
because it is more intuitive to use and doesn't require the
tz_aware_datetime-workaround.
2017-07-07 14:22:24 +02:00
Thor77
a4c04e34c8
Close log files after parsing
2017-05-11 11:32:11 +02:00
Thor77
8d18b9c4ae
Fix not using defined variable for match-access
...
possibly leading to slower access-times
2017-03-31 22:21:54 +02:00
Thor77
1bc555d66c
Add IdentMap-lookup for new clients
...
added to clients-collection during log-parsing
Fix #18
2017-03-30 20:10:08 +02:00
Thor77
0081ac9939
Log parse time of individual logs
2017-03-24 23:18:26 +01:00
Thor77
4adfb9cfc1
Make all datetime-objects timezone-aware
...
Because the tool is using utc-timestamps everywhere, this emphasizes
this fact (by default) in the output.
If you don't want timezones behind each datetime in your output, just
remove the "%Z" from the `datetimeformat`.
Fix #9
2017-02-16 22:44:51 +01:00
Thor77
22f6402bce
Add nick-history functionality
...
hover a nickname to show previous nicks
2017-02-11 22:14:34 +01:00
Thor77
fdbde18856
parse_logs: Return Server instead of dict
...
because it's easier to iterate and access contained information
2016-11-19 22:25:57 +01:00
Thor77
03c0941962
Add safety-measure to ensure clients disconnect at server stop
2016-11-06 19:23:00 +01:00
Thor77
c8955bee5e
Remove double-iteratation over logfiles
...
by passing the iterator returned by glob.glob direclty to _bundle_logs
2016-11-06 19:18:21 +01:00
Thor77
812916f179
Use list-comprehension for reconnect
...
to make this action more obvious and understandable
2016-11-04 20:03:46 +01:00
Thor77
ba8e082e64
Reconnect clients only for last log (online_dc)
...
because doing it after every log would lead to insane onlinetimes
and only the last log should have online clients, anyways.
Fix #4
2016-11-03 22:52:05 +01:00
Thor77
c0096a7c52
Read logs as utf-8
2016-11-02 21:24:07 +01:00
Thor77
2d80ba6804
Add action-group to re_dis_connect.
...
Used to not rely on position in message
for correct action-parsing.
2016-10-27 00:08:28 +02:00
Thor77
b6e73e733d
Fix adding server/clientgroup-actions to clients.
...
This was caused, because the used regex was very generic.
Therefore it parsed these lines without any problems,
a timestamp wasn't added but it was already in the clients-dict,
when these checks (conn or disconnect) were performed.
2016-10-27 00:02:56 +02:00
Thor77
0b667f55b7
check for None instead of False to allow empty clients as arg to tsstats.log._parse_details
2016-06-22 20:40:30 +02:00
Thor77
def9f2e1e2
fix logpath not given to _bundle_logs in tsstats.log.parse_logs
2016-06-21 22:16:39 +02:00
Thor77
21be54675f
add proper func-doc to tsstats.log.parse_logs
2016-06-21 18:29:59 +02:00
Thor77
c132c17661
add ident_map-arg to tsstats.log.parse_logs
...
* give all given arguments to tsstats.log._bundle_logs while parsing (*args,
**kwargs)
2016-06-21 18:20:57 +02:00
Thor77
c0f1a6c649
add glob-resolution to tsstats.log.parse_logs
...
* correct name of bundle-function (to tsstats.log._bundle_logs)
* add .items() to correct for-loop
2016-06-20 22:02:55 +02:00
Thor77
9a6bbe4f3e
fix 2 typos in tsstats.log._bundle_logs
2016-06-20 21:59:46 +02:00
Thor77
105f464b9a
sort logs by path, if timestamp not available, though
2016-06-20 21:38:57 +02:00
Thor77
e92ad9e6fe
update scope of tsstats.log._sort_logs (rename to tsstats.log._bundle_logs)
...
* rename to tsstats.log._bundle_logs
* expect list of logpaths as argument and return them sorted
* move globbing-stuff to parse_logs in an upcoming commit
2016-06-20 21:31:59 +02:00
Thor77
612055a088
add wip tsstats.log.parse_logs
2016-06-19 22:26:19 +02:00
Thor77
0c57b27abc
update documentation of tsstats.log._sort_logfiles to fit updated scope
2016-06-19 22:21:02 +02:00
Thor77
37a9841900
rename tsstats.log.parse_logs to tsstats.log._sort_logfiles to fit updated scope
2016-06-19 22:13:05 +02:00
Thor77
ad7ff96b1b
add filename-checking to split logs by sid
...
* if filename doesn't match, fallback to plain sorting
* using re_log_filename to match
2016-06-19 22:10:35 +02:00
Thor77
bec0279871
rename tsstats.log.parse_log to tsstats.log._parse_details
2016-06-19 21:44:23 +02:00
Thor77
2821713150
redefine scope of tsstats.log.* in func-docs
2016-06-19 21:37:00 +02:00
Thor77
28855e9a81
use datetime.timedelta for Client.onlinetime instead of int
...
* get rid of all the converting-stuff
2016-06-12 17:52:44 +02:00
Thor77
9d5197d813
use py2-compatible way to convert datetime.datetime to timestamp
...
* bump version to 0.6.8
2016-06-12 17:20:32 +02:00
Thor77
276dce0074
give all *args and **kwargs given to tsstats.log.parse_logs directly to parse_log
2016-06-12 17:01:35 +02:00
Thor77
4e4eacd3af
disconnect online clients after parsing to display correct onlinetime
...
* toggle by setting tsstats.log(online_dc=)
* fix #1
2016-06-12 16:54:49 +02:00
Thor77
4acfe5bd0b
fix references to identmap-doc from tsstats.client and tsstats.log
...
* use :doc: instead of :ref:
* bump version to 0.6.5
2016-06-08 22:36:26 +02:00
Thor77
52a05acdab
add source-encoding (utf-8) to all files
2016-06-07 17:42:53 +02:00
Thor77
c3cfad0a88
fix wrong regex for logs with unexpected spacing
...
* add "\ *" arround level, component, sid and message
2016-06-07 16:51:55 +02:00
Thor77
8ca23e0115
add documentation to tsstats.{config,log,template,utils}.*
2016-05-30 20:23:03 +02:00
Thor77
a1f25648a2
define log_format just once and rename to log_timestamp_format
2016-05-25 20:09:48 +02:00
Thor77
da5683ede2
add tsstats.log.re_log_entry for log-line-matching
...
* don't evaluate invalid log-lines leading to unexpected results
* don't abort parsing just because of an invalid character at the beginning/end
* add debug-output if line doesn't match
2016-05-25 20:06:00 +02:00
Thor77
42d8c74f72
fix tsstats.log.parse_logs not returning clients
2016-05-24 22:29:49 +02:00
Thor77
53ffad3d81
refactor tsstats.log.parse_log(s)
...
* rename tsstats.log.parse_logs to tsstats.log.parse_log and remove glob-functionality
* create tsstats.log.parse_log to handle globbing
* fix tests to use tsstats.log.parse_log instead of tsstats.log.parse_logs
* bump version to 0.4.0
2016-05-23 21:50:10 +02:00
Thor77
af3ea48a2d
re-add redundant client.nick= in tsstats.log.parse_logs to display nick-changes
2016-05-19 21:59:34 +02:00
Thor77
4bb7553f64
remove duplicate code in tsstats.log.parse_logs
...
* bump version to 0.2.4
2016-05-19 21:57:15 +02:00
Thor77
61421c588a
use None as default for ident_map in tsstats.log.parse_logs
2016-05-19 21:46:22 +02:00
Thor77
55277a2c75
use optional-nick-arg instead of explicit assignment
2016-05-19 15:39:36 +02:00
Thor77
216bedc38f
refactor tsstats.client.Clients
...
* use collections.MutableMapping as base
* use one dict to store all types of Clients
* don't use implicit += but explicit .setdefault in tsstats.log for client-adding
* give all clients to sort_clients in tsstats.template
* remove now unneccessary clients-assignment in tsstats.utils.sort_clients
2016-05-18 22:50:23 +02:00
Thor77
e7fc91229e
use % formatting in logging-functions
2016-05-11 20:45:42 +02:00
Thor77
d836b807be
move logging-setup into __init__.py and use one central logger-object
2016-05-10 22:50:34 +02:00
Thor77
7e2f4ba09f
use py2-style timestamp-retrieval
2016-05-08 21:54:58 +02:00
Thor77
a25a596d02
split tsstats.py into package with multiple files
2016-05-08 21:32:37 +02:00