<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -64,6 +64,7 @@
 %%----------------------------------------------------------------------
 %% Helper macros
 %%----------------------------------------------------------------------
+-define(EWGI_LOGGER_NAME, smak_logger).
 -define(EWGI_LOGGER_KEY, '_smak_logger').
 -define(CTX_LOG(Ctx, L, F, A),
         case ewgi_api:find_data(?EWGI_LOGGER_KEY, Ctx) of</diff>
      <filename>include/smak.hrl</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 -module(smak_log).
 -author('Hunter Morris &lt;hunter.morris@smarkets.com&gt;').
 
+-export([start_link/0, start_link/1]).
 -export([init/1, level_compare/2]).
 
 -include(&quot;smak.hrl&quot;).
@@ -19,12 +20,22 @@
 %% @type sl_option() = {name, atom()}
 -type sl_option() :: {'name', atom()}.
 
+-type start_result() :: {'ok', pid()} | {error, {'already_started', pid()}} | {error, any()}.
+
+-spec start_link() -&gt; start_result().
+start_link() -&gt;
+    start_link({local, ?EWGI_LOGGER_NAME}).
+
+-spec start_link({'local', atom()} | {'global', atom()}) -&gt; start_result().
+start_link(Name) -&gt;
+    gen_event:start_link(Name).
+
 %% @spec init(Options::[sl_option()]) -&gt; ewgi_app()
 %% @doc Initialises the logging middleware which provides a function
 %% for logging from an application.
 -spec init([sl_option()]) -&gt; ewgi_app().
 init(Options) when is_list(Options) -&gt;
-    Name = proplists:get_value(name, Options, ?EWGI_LOGGER_KEY),
+    Name = proplists:get_value(name, Options, ?EWGI_LOGGER_NAME),
     F = fun(Ctx0) -&gt;
                 ewgi_api:store_data(?EWGI_LOGGER_KEY, log_event(Name), Ctx0)
         end,</diff>
      <filename>src/smak_log.erl</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@
 -author('Hunter Morris &lt;hunter.morris@smarkets.com&gt;').
 -behaviour(gen_event).
 
--export([add/2, delete/1]).
+-export([add/1, add/2, delete/0, delete/1]).
 -export([init/1, handle_event/2, terminate/2, code_change/3, handle_call/2, handle_info/2]).
 
 -include(&quot;smak.hrl&quot;).
@@ -26,10 +26,18 @@
           level :: log_level()
          }).
 
--spec add(atom(), [slc_option()]) -&gt; ok.
+-spec add([slc_option()]) -&gt; 'ok'.
+add(Options) -&gt;
+    add(?EWGI_LOGGER_NAME, Options).
+
+-spec add(atom(), [slc_option()]) -&gt; 'ok'.
 add(Name, Options) -&gt;
     gen_event:add_handler(Name, ?MODULE, Options).
 
+-spec delete() -&gt; 'ok'.
+delete() -&gt;
+    delete(?EWGI_LOGGER_NAME).
+
 -spec delete(atom()) -&gt; 'ok'.
 delete(Name) -&gt;
     gen_event:delete_handler(Name, ?MODULE, []).</diff>
      <filename>src/smak_log_console.erl</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@
 -author('Hunter Morris &lt;hunter.morris@smarkets.com&gt;').
 -behaviour(gen_event).
 
--export([add/2, delete/1]).
+-export([add/1, add/2, delete/0, delete/1]).
 -export([init/1, handle_event/2, terminate/2, code_change/3, handle_call/2, handle_info/2]).
 
 -include(&quot;smak.hrl&quot;).
@@ -27,10 +27,18 @@
           level :: log_level()
          }).
 
--spec add(atom(), [slf_option()]) -&gt; ok.
+-spec add([slf_option()]) -&gt; 'ok'.
+add(Options) -&gt;    
+    add(?EWGI_LOGGER_NAME, Options).
+
+-spec add(atom(), [slf_option()]) -&gt; 'ok'.
 add(Name, Options) -&gt;
     gen_event:add_handler(Name, ?MODULE, Options).
 
+-spec delete() -&gt; 'ok'.
+delete() -&gt;
+    delete(?EWGI_LOGGER_NAME).
+    
 -spec delete(atom()) -&gt; 'ok'.
 delete(Name) -&gt;
     gen_event:delete_handler(Name, ?MODULE, []).</diff>
      <filename>src/smak_log_file.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>47eaf1f9298f9fe5c67d029e822c095cd11209fe</id>
    </parent>
  </parents>
  <author>
    <name>Hunter Morris</name>
    <email>huntermorris@gmail.com</email>
  </author>
  <url>http://github.com/skarab/smak/commit/ab4d7bb3cdc81ee11677769c68b01902c3cdeeda</url>
  <id>ab4d7bb3cdc81ee11677769c68b01902c3cdeeda</id>
  <committed-date>2009-03-11T18:39:28-07:00</committed-date>
  <authored-date>2009-03-11T18:39:28-07:00</authored-date>
  <message>Fixed logging so that default logger name and EWGI data keys are separate</message>
  <tree>b93a7f7a14b308d182c645bd444ac5dcba42bf47</tree>
  <committer>
    <name>Hunter Morris</name>
    <email>huntermorris@gmail.com</email>
  </committer>
</commit>
