[4136] in BarnOwl Developers
[barnowl/barnowl] 7f463c: Moved log generation code to perl.
daemon@ATHENA.MIT.EDU (GitHub)
Wed Aug 16 12:53:57 2017
Date: Wed, 16 Aug 2017 09:53:45 -0700
From: GitHub <noreply@github.com>
Reply-To: GitHub <noreply@github.com>
To: barnowl-dev@mit.edu
----==_mimepart_599478992e630_65953fb059195c3c5051
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Branch: refs/heads/master
Home: https://github.com/barnowl/barnowl
Commit: 7f463cf84381f15c8963378e077bb3a96eeffd86
https://github.com/barnowl/barnowl/commit/7f463cf84381f15c8963378e077bb3a96eeffd86
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M logging.c
M perl/lib/BarnOwl/Message.pm
M perl/lib/BarnOwl/Message/Zephyr.pm
Log Message:
-----------
Moved log generation code to perl.
Commit: da7341e48ef4a151ee32fe828f2bbe30f4406019
https://github.com/barnowl/barnowl/commit/da7341e48ef4a151ee32fe828f2bbe30f4406019
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perlglue.xs
Log Message:
-----------
Made owl_util_makepath available from perl
There's probably a better way to do this. Maybe
sub makepath {
my $filename = shift;
$filename =~ s{ ^ ~ ( [^/]* ) } { $1 ? (getpwnam($1))[7]
: ( $ENV{HOME} || $ENV{LOGDIR} || (getpwuid($>))[7] ) }ex;
return $filename;
}
(http://docstore.mik.ua/orelly/perl/cookbook/ch07_04.htm) or something.
Additionally, I'm not sure why
PREINIT:
char *rv = NULL;
CODE:
{
rv = foo();
RETVAL = rv;
}
OUTPUT:
RETVAL
CLEANUP:
g_free(rv);
is the paradigm for functions returning strings, when foo returns `char
*` and not `const char *`. I've removed the `= NULL` part of the
initlization, which I assume is left over from when we had to NULL-check
things before freeing them, but I've copied the rest of the code.
Commit: eea7bed400b55cdc510b806ea4230d174b165470
https://github.com/barnowl/barnowl/commit/eea7bed400b55cdc510b806ea4230d174b165470
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M logging.c
M perl/Makefile.am
M perl/lib/BarnOwl.pm
A perl/lib/BarnOwl/Logging.pm
M perl/lib/BarnOwl/Message.pm
M perl/lib/BarnOwl/Message/AIM.pm
M perl/lib/BarnOwl/Message/Zephyr.pm
M perl/modules/Jabber/lib/BarnOwl/Message/Jabber.pm
Log Message:
-----------
Moved log file name generation to perl
I don't think that the class/personal distinction is the best for
general protocols, but I don't know what should replace it. I've made
class-logging default to only zephyr (a slight change from previous
behavior, where jabber MUC's would be logged to $classlogpath, as well
as all non-private non-login messages from other protocols), but made
logging path generation overridable.
TODO: Decide whether or not to filter out more 'bad' characters.
Perhaps we should remove '!' because it indicates history in some shells
and makes things obnoxious, or '~' becase it indicates homedirs in many
shells.
* '/' is for separating directories, and we don't want to accidentally
make subdirectories
We first NFKC for zephyrs, and then apply lc. The zephyr servers
apply case-folded NFKC (so says
http://zephyr.1ts.org/browser/zephyr/server/zstring.c). We should
probably use Unicode::CaseFold instead of lc. I'm also not sure what
the order case-adjustment and normalization should be.
We first NFKC, then apply lc, to jabbers, as per
http://xmpp.org/internet-drafts/attic/draft-ietf-xmpp-nodeprep-03.html
(though I can't actually find anything that specifies the case-folding
algorithm, nor the ordering).
We now use lc instead of g_utf8_strdown to normalize AIM screennames.
Commit: ff528e6bc3d6f9318f3e1d59ff6e96f79cd0328b
https://github.com/barnowl/barnowl/commit/ff528e6bc3d6f9318f3e1d59ff6e96f79cd0328b
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M message.c
Log Message:
-----------
Scrapped the last bits of C code dealing with jabber.
We still have an OWL_PROTOCOL_JABBER in owl.h, but it does no harm being
there, and we don't use any of the other ones except for AIM. I figure
there's no harm in waiting and ripping all of them out at the same time
in perl/AIM
Commit: 9bfab40b6e10c70af6a97c0c1be89abbb557c3db
https://github.com/barnowl/barnowl/commit/9bfab40b6e10c70af6a97c0c1be89abbb557c3db
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M logging.c
M perl/lib/BarnOwl/Message.pm
Log Message:
-----------
Moved outgoing zephyr error logging to perl
Commit: 5093c6f01fd51f20f4fe96ce622a09811e6eeaae
https://github.com/barnowl/barnowl/commit/5093c6f01fd51f20f4fe96ce622a09811e6eeaae
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M logging.c
M perl/lib/BarnOwl/Logging.pm
M perl/lib/BarnOwl/Message.pm
M perl/lib/BarnOwl/Message/Zephyr.pm
M perlglue.xs
Log Message:
-----------
Moved the checking of whether or not to log messages to perl
Commit: 4ead7b3fe1e9044da12216fdd149dffdcef7e723
https://github.com/barnowl/barnowl/commit/4ead7b3fe1e9044da12216fdd149dffdcef7e723
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M logging.c
M owl.c
M perl/lib/BarnOwl/Logging.pm
Log Message:
-----------
Moved notification of message logging to perl
Commit: 42779f8a9eab9122759b884712585455a3cb2b70
https://github.com/barnowl/barnowl/commit/42779f8a9eab9122759b884712585455a3cb2b70
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
M variable.c
Log Message:
-----------
Moved logging-specific variables to perl
But only the ones that could be moved losslessly, i.e., no special
validsettings and not enums.
Commit: 03fbf6607dc414a0baf05fa28c228f949a59d39a
https://github.com/barnowl/barnowl/commit/03fbf6607dc414a0baf05fa28c228f949a59d39a
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
M tester.c
M variable.c
Log Message:
-----------
Moved the last of the logging-related variables to perl
We seem to have picked logpath as the string variable we test in
tester.c. Since this is no longer in C, I've replaced it with
personalbell (no particular reason for that choice).
Commit: 94b4b99ef17ad354d9f4b7a0c8e62c397a7ed25e
https://github.com/barnowl/barnowl/commit/94b4b99ef17ad354d9f4b7a0c8e62c397a7ed25e
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Zephyr.pm
Log Message:
-----------
Ignore kerberos instances in the sender and recipient when logging
This fixes trac-#151 (Handle logging of personal zephyrs from different
instances of Kerberos principals sanely). Stripping the instance is
only done for the filename, not for the actual log contents.
Commit: 3374de932d0a44851a5b6a3bf89bd8f4cfd5f2f5
https://github.com/barnowl/barnowl/commit/3374de932d0a44851a5b6a3bf89bd8f4cfd5f2f5
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Zephyr.pm
Log Message:
-----------
Log different realms to different files
Commit: 9a3404024cfa63105c2e8d1125156fcb06fec54e
https://github.com/barnowl/barnowl/commit/9a3404024cfa63105c2e8d1125156fcb06fec54e
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
Log Message:
-----------
Add IRC logging filename generation
Based on asedeno's comment
"For IRC I'd probably want a combination of network and (channel or
nick)."
Commit: dce72c12ddfe50eeadca497b9a1b549ffb20574a
https://github.com/barnowl/barnowl/commit/dce72c12ddfe50eeadca497b9a1b549ffb20574a
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
M perl/lib/BarnOwl/Message.pm
M perl/lib/BarnOwl/Message/Zephyr.pm
Log Message:
-----------
Log to subfolders of a base path
A different subfolder for each protocol.
Commit: 15b87cc02f69df6b4804bda27b7c7fe1bee39855
https://github.com/barnowl/barnowl/commit/15b87cc02f69df6b4804bda27b7c7fe1bee39855
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
Log Message:
-----------
Remove irc: from irc message filenames
Commit: 6ddfb075638c52517a74900dab01e131a7e6dc8d
https://github.com/barnowl/barnowl/commit/6ddfb075638c52517a74900dab01e131a7e6dc8d
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
Log Message:
-----------
Add a comment about existence of logging dirs
Commit: 47225c9217d8de50e8d4a65f94007a007fc9ee8d
https://github.com/barnowl/barnowl/commit/47225c9217d8de50e8d4a65f94007a007fc9ee8d
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
Log Message:
-----------
Update IRC logging to be more idiomatic
Based on a message from kini on #oplss at 2013-07-27 12:40:
freenode / #oplss / kini 2013-07-27 12:40 (kini!kini@unaffiliated/kini)
jgross: the standard format is "[timestamp] <username> message", one line per message
freenode / #oplss / kini 2013-07-27 12:41 (kini!kini@unaffiliated/kini)
non-message events are usually notated as "* event description", e.g. "* kini (unaffiliated/kini) joined
#oplss", or whatever
Commit: d2ba33c97c6ce03577e00d936befe00c57f64e5b
https://github.com/barnowl/barnowl/commit/d2ba33c97c6ce03577e00d936befe00c57f64e5b
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Zephyr.pm
M perl/modules/Jabber/lib/BarnOwl/Message/Jabber.pm
M perlglue.xs
A t/BarnOwl_Message_Zephyr.t
M util.c
Log Message:
-----------
Use g_utf8_casefold and g_utf8_normalize
We define a convenience function compat_casefold in util.c for reuse in
filters.
Commit: 5dee79adc05057c59de7074d72c8bbc22997f39d
https://github.com/barnowl/barnowl/commit/5dee79adc05057c59de7074d72c8bbc22997f39d
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
M perl/lib/BarnOwl/Message.pm
Log Message:
-----------
Add log-to-subdirectories, a compatibility frob
If disabled (the default), then logging of jabber and AIM messages
behaves how it used to. If enabled, then each protocol gets its own
subdirectory.
Commit: 8cec8f7733fe3c2bdbfc90138222be757c7093f2
https://github.com/barnowl/barnowl/commit/8cec8f7733fe3c2bdbfc90138222be757c7093f2
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Loopback.pm
Log Message:
-----------
Log loopbacks to loopback file in ~/zlog
Not to ~/zlog/loop{sender,recip}. If compatibility logging is on,
loopbacks get logged to ~/zlog/people/loopback, which is what happened
before this branch.
Commit: 54c53957753b9ee555dc8db2f352738d28e0ef3e
https://github.com/barnowl/barnowl/commit/54c53957753b9ee555dc8db2f352738d28e0ef3e
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
Log Message:
-----------
Note conflict of loggingdirection and classlogging
The description of loggingdirection specifies that it applies to all
messages, and thus overrides classlogging.
This implements option (2) of trac #242.
Commit: 9625c553b85d5ec1d02833b0e43fdfca543f4e15
https://github.com/barnowl/barnowl/commit/9625c553b85d5ec1d02833b0e43fdfca543f4e15
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Zephyr.pm
M t/BarnOwl_Message_Zephyr.t
Log Message:
-----------
Silence "Use of uninitialized value $realm in uc"
Commit: 3222df2dae15da99734d61824f1f20e80af0c60d
https://github.com/barnowl/barnowl/commit/3222df2dae15da99734d61824f1f20e80af0c60d
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
Log Message:
-----------
Replace initial . with _
This is so that, e.g., we won't write to .git, .gitconfig, etc.
Commit: b807d8fc90e64b4b1bbc2eea7255181f20b4d5fb
https://github.com/barnowl/barnowl/commit/b807d8fc90e64b4b1bbc2eea7255181f20b4d5fb
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Logging.pm
Log Message:
-----------
Improve some documentation of logging variables
As per PR #54 review comments.
Commit: 09f7753c8ac201be34a1cd42437c8d1506da437d
https://github.com/barnowl/barnowl/commit/09f7753c8ac201be34a1cd42437c8d1506da437d
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Zephyr.pm
Log Message:
-----------
Add back a comment into perl-logging from C
Commit: 8f91a70f97fd425b80d890b7e1e7607cad71da90
https://github.com/barnowl/barnowl/commit/8f91a70f97fd425b80d890b7e1e7607cad71da90
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/lib/BarnOwl/Message/Zephyr.pm
Log Message:
-----------
Add a bit more documentation
The function was potentially a bit confusing under code review.
Commit: 3f0c209b7186a72fd00aaa4ab00fbee92cdc90bb
https://github.com/barnowl/barnowl/commit/3f0c209b7186a72fd00aaa4ab00fbee92cdc90bb
Author: Jason Gross <jgross@mit.edu>
Date: 2017-08-16 (Wed, 16 Aug 2017)
Changed paths:
M perl/modules/IRC/lib/BarnOwl/Message/IRC.pm
Log Message:
-----------
Add comment about irc logging format
Compare: https://github.com/barnowl/barnowl/compare/a619eda8e9e8...3f0c209b7186
----==_mimepart_599478992e630_65953fb059195c3c5051--