[MacRuby-devel] syslog Re: Contributions (Was: Experimental branch status)
Laurent Sansonetti
lsansonetti at apple.com
Thu Jun 4 15:25:40 PDT 2009
On Jun 3, 2009, at 8:43 PM, Ernest N. Prabhakar, Ph.D. wrote:
> On Jun 3, 2009, at 6:30 PM, Charles Oliver Nutter wrote:
>>> Other extensions part of the Ruby distribution that might be
>>> interesting to port: openssl, syslog, zlib.
>>
>> syslog and zlib are also already ported to FFI.
>
> Hmm, just out of curiosity, any chance we could have MacRuby use
> Apple's System Logger instead (compatible API, but much richer
> backend):
>
> http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/asl.3.html#/
> /apple_ref/doc/man/3/asl
>
> I'm pretty sure it is open source, so it could even be used cross-
> platform:
>
> http://www.opensource.apple.com/source/syslog/syslog-69.0.4/
Well, the syslog C extension is just a wrapper around the syslog.h
API, which appears to be implemented on top of ASL. So it does not
really matter here, if you use this API it will end in the ASL backend.
Now, ASL comes with its own API, to do custom filters for example, and
this API is already covered in the libSystem.bridgesupport file, so it
can be used by PyObjC, RubyCocoa, MacRuby etc. already today.
(See the /Developer/Examples/Ruby/RubyCocoa/Scripts/libSystem/asl*.rb
scripts as an example.)
Laurent
More information about the MacRuby-devel
mailing list