Permalink
Browse files

Merge branch 'master' of https://github.com/ohmforce/erlang-syslog

  • Loading branch information...
2 parents ff3a31f + b77fd3f commit 868919f578b53dd1c74fa6640070922720dd37da @Vagabond committed Feb 8, 2011
Showing with 212 additions and 319 deletions.
  1. +4 −0 .gitignore
  2. +90 −0 README.md
  3. +0 −317 Rakefile
  4. BIN rebar
  5. +12 −0 src/syslog.app.src
  6. +62 −2 src/syslog.erl
  7. +16 −0 src/syslog_app.erl
  8. +28 −0 src/syslog_sup.erl
View
@@ -0,0 +1,4 @@
+c_src/syslog_drv.o
+ebin/
+priv/
+.eunit/
View
@@ -0,0 +1,90 @@
+Erlang driver for syslog
+------------------------
+
+Forked from [vagabond's erlang syslog](http://github.com/Vagabond/erlang-syslog) . First step was rebarisation, then atom for parameters.
+
+Installing it
+-------------
+
+ ./rebar compile
+ sudo ./rebar install
+
+Trying it
+---------
+
+You should have a look at syslog.h
+
+In an other shell :
+
+ $ tail -f /var/log/sylsog
+Or for mac user :
+
+ $ tail -f /var/log/system.log
+
+In erlang shell :
+
+ $ erl
+ > syslog:start().
+ > syslog:open("Beuha", [cons, perror, pid], local0).
+ > syslog:log(err, "Damned").
+
+API
+---
+
+### syslog:open(Ident, Logopt, Facility) ###
+
+_Ident_ is an arbitrary string
+_Logopt_ is an atom or array of atom, you can use a number if you're brave enough :
+
+ * pid
+ * cons
+ * odelay
+ * ndelay
+ * perror
+
+_Facility_ is an atom :
+
+ * kern
+ * user
+ * mail
+ * daemon
+ * auth
+ * syslog
+ * lpr
+ * news
+ * uucp
+ * cron
+ * authpriv
+ * ftp
+ * netinfo
+ * remoteauth
+ * install
+ * ras
+ * local0
+ * local1
+ * local2
+ * local3
+ * local4
+ * local5
+ * local6
+ * local7
+
+### syslog:log(Priority, Message) ###
+
+_Priority_ can be a number or better, an atom :
+
+ * emerg
+ * alert
+ * crit
+ * err
+ * warning
+ * notice
+ * info
+ * debug
+
+_Message_ is a String
+
+BUGS
+----
+
+ * Not a full OTP application
Oops, something went wrong.

0 comments on commit 868919f

Please sign in to comment.