<p>Is it absolutely critical that I always close Syslog when I'm done using it? Is there a huge negative impact from not doing so?</p>

<p>If it turns out that I definitely need to, what's a good way to do it? I'm opening Syslog in my class constructor and I don't see a way to do class destructors in Ruby, and currently have something resembling this:</p>

<pre><code>class Foo
  def initialize
    @@log = Syslog.open("foo")
  end
end
</code></pre>

<p>I don't immediately see the place where the <code>Syslog.close</code> call should be, but what do you recommend?</p>

The open method accepts a block.  Do something like this:
```
```
class Foo
  def do_something
    Syslog.open do
      # work with the syslog here
    end
  end
end
```
```