Skip to content

Instantly share code, notes, and snippets.

View sacha's full-sized avatar

Sacha Bernstein sacha

View GitHub Profile
@mardambey
mardambey / mod_log_remote.erl
Created August 23, 2012 03:44
mod_log_remote allows for logging Ejabberd messages / packets to a remote Erlang node.
%%
%% mod_log_remote is a simple Ejabberd module and gen_server that
%% allow for remote logging. It uses the filter_packet hook to
%% intercept <message> stanzas addressed to logger@vhost. These
%% messages are beamed off to the configured Erland node / pid in
%% the form:
%%
%% {Type, LogTime, Payload}
%%
%% where Type and Payload are specified by the caller and LogTime is