You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Andrew Lazarus <dr...@me.com> on 2012/12/03 19:20:43 UTC

Files added to JIRA 405 (Apple Syslog)

I’ve added a .h and .cpp file that are working for me as an appender to the Apple System Log.


Re: Files added to JIRA 405 (Apple Syslog)

Posted by Christian Grobmeier <gr...@gmail.com>.
On Mon, Dec 3, 2012 at 7:32 PM, Andrew Lazarus <dr...@me.com> wrote:
> I wanted one go-round of comments before I made it “official” looking.

Makes perfect sense.

One thing I would like to know:

#ifndef __APPLE__
#error This is a Mac/ioS only file
#else

What happens if I use this file from windows? I mean, it is a compile
time error right? It would be good, if, me thinks.

> I have a unit test, too. The problem is that it required my examining the Apple Console manually for the inserted record. I’ll turn it into an automated test of some sort—I guess by querying the System Log.

Oh yes, it is pretty difficult i think

>
> On Dec 3, 2012, at 10:29, Christian Grobmeier <gr...@gmail.com> wrote:
>
>> Hi,
>>
>> they look good to me.
>>
>> Two questions:
>>
>> - any specific reason why you are delivering those without svn patch?
>> I think you need to do "svn add <filename>" and then they should
>> appear in the patch file
>>
>> - I am not familiar with C/C++. But I see there is something which
>> looks like unit tests here:
>> http://svn.apache.org/repos/asf/logging/log4cxx/trunk/src/test/cpp/
>>
>> Do you think it is a good idea to keep up the tradition with unit testing?
>>
>> Cheers + Thanks for the work! The files look good to me :-)
>>
>> Christian
>>
>> On Mon, Dec 3, 2012 at 7:20 PM, Andrew Lazarus <dr...@me.com> wrote:
>>> I’ve added a .h and .cpp file that are working for me as an appender to the Apple System Log.
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
>



--
http://www.grobmeier.de
https://www.timeandbill.de

Re: Files added to JIRA 405 (Apple Syslog)

Posted by Andrew Lazarus <dr...@me.com>.
It’s set up as follows: the .cpp file is guarded by __APPLE__ (which would not be #defined on Windows) but doesn’t generate an error message, it just gets skipped, so you can build the entire project without any problem. The header file will give a compile-time error if included from a non-Apple platform, which won’t happen in the normal build, because the only place it is included is that cpp file. However, if someone were using the header file in his own Mac/iOS project and then ported to Windows, there would be an error. The compile would fail anyway since Windows won’t have the system header asl.h nor the aslclient pre-defined struct, but this way the error message identifies the exact reason.

On Dec 3, 2012, at 10:32, Andrew Lazarus <dr...@me.com> wrote:

> I wanted one go-round of comments before I made it “official” looking.
> 
> I have a unit test, too. The problem is that it required my examining the Apple Console manually for the inserted record. I’ll turn it into an automated test of some sort—I guess by querying the System Log.
> 
> On Dec 3, 2012, at 10:29, Christian Grobmeier <gr...@gmail.com> wrote:
> 
>> Hi,
>> 
>> they look good to me.
>> 
>> Two questions:
>> 
>> - any specific reason why you are delivering those without svn patch?
>> I think you need to do "svn add <filename>" and then they should
>> appear in the patch file
>> 
>> - I am not familiar with C/C++. But I see there is something which
>> looks like unit tests here:
>> http://svn.apache.org/repos/asf/logging/log4cxx/trunk/src/test/cpp/
>> 
>> Do you think it is a good idea to keep up the tradition with unit testing?
>> 
>> Cheers + Thanks for the work! The files look good to me :-)
>> 
>> Christian
>> 
>> On Mon, Dec 3, 2012 at 7:20 PM, Andrew Lazarus <dr...@me.com> wrote:
>>> I’ve added a .h and .cpp file that are working for me as an appender to the Apple System Log.
>>> 
>> 
>> 
>> 
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
> 


Re: Files added to JIRA 405 (Apple Syslog)

Posted by Andrew Lazarus <dr...@me.com>.
I wanted one go-round of comments before I made it “official” looking.

I have a unit test, too. The problem is that it required my examining the Apple Console manually for the inserted record. I’ll turn it into an automated test of some sort—I guess by querying the System Log.

On Dec 3, 2012, at 10:29, Christian Grobmeier <gr...@gmail.com> wrote:

> Hi,
> 
> they look good to me.
> 
> Two questions:
> 
> - any specific reason why you are delivering those without svn patch?
> I think you need to do "svn add <filename>" and then they should
> appear in the patch file
> 
> - I am not familiar with C/C++. But I see there is something which
> looks like unit tests here:
> http://svn.apache.org/repos/asf/logging/log4cxx/trunk/src/test/cpp/
> 
> Do you think it is a good idea to keep up the tradition with unit testing?
> 
> Cheers + Thanks for the work! The files look good to me :-)
> 
> Christian
> 
> On Mon, Dec 3, 2012 at 7:20 PM, Andrew Lazarus <dr...@me.com> wrote:
>> I’ve added a .h and .cpp file that are working for me as an appender to the Apple System Log.
>> 
> 
> 
> 
> --
> http://www.grobmeier.de
> https://www.timeandbill.de


Re: Files added to JIRA 405 (Apple Syslog)

Posted by Christian Grobmeier <gr...@gmail.com>.
Hi,

they look good to me.

Two questions:

- any specific reason why you are delivering those without svn patch?
I think you need to do "svn add <filename>" and then they should
appear in the patch file

- I am not familiar with C/C++. But I see there is something which
looks like unit tests here:
http://svn.apache.org/repos/asf/logging/log4cxx/trunk/src/test/cpp/

Do you think it is a good idea to keep up the tradition with unit testing?

Cheers + Thanks for the work! The files look good to me :-)

Christian

On Mon, Dec 3, 2012 at 7:20 PM, Andrew Lazarus <dr...@me.com> wrote:
> I’ve added a .h and .cpp file that are working for me as an appender to the Apple System Log.
>



--
http://www.grobmeier.de
https://www.timeandbill.de