Permalink
Browse files

Fix some unused vars and update README

  • Loading branch information...
1 parent 868919f commit 1b0cafd070fabbc81f81a98ae8d5c48947ada994 @Vagabond committed Feb 8, 2011
Showing with 7 additions and 6 deletions.
  1. +4 −3 README.md
  2. +3 −3 src/syslog.erl
View
@@ -1,7 +1,7 @@
Erlang driver for syslog
------------------------
-Forked from [vagabond's erlang syslog](http://github.com/Vagabond/erlang-syslog) . First step was rebarisation, then atom for parameters.
+This is an erlang port driver for interacting with syslog.
Installing it
-------------
@@ -17,7 +17,8 @@ You should have a look at syslog.h
In an other shell :
$ tail -f /var/log/sylsog
-Or for mac user :
+
+Or, for mac users :
$ tail -f /var/log/system.log
@@ -87,4 +88,4 @@ _Message_ is a String
BUGS
----
- * Not a full OTP application
+ * Not a full OTP application
View
@@ -98,15 +98,15 @@ handle_call({log, Priority, Message}, _From, #state{port = Port} = State) ->
port_command(Port, erlang:term_to_binary({log, Priority, lists:flatten(Message)})),
Reply = receive
{Port, {data, Bin}} ->
- Result = binary_to_term(Bin)
+ binary_to_term(Bin)
after 1000 -> timeout
end,
{reply, Reply, State};
-handle_call({open, Ident, Logopt, Facility}, _From, State) ->
+handle_call({open, Ident, Logopt, Facility}, _From, #state{port = Port} = State) ->
port_command(State#state.port, erlang:term_to_binary({open, Ident, Logopt, Facility})),
Reply = receive
{Port, {data, Bin}} ->
- Result = binary_to_term(Bin)
+ binary_to_term(Bin)
after 1000 -> timeout
end,
{reply, Reply, State};

0 comments on commit 1b0cafd

Please sign in to comment.