# Log4P Project Class Names

- Thread: https://externals.io/message/31277
- Original archive: https://news-web.php.net/php.internals/31277
- Started by Will Fitch on 2007-07-25T23:20:46+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #31277 — Will Fitch — 2007-07-25T23:20:46+00:00

URL: https://externals.io/message/31277#31277

Hello All,

 

I am continuing my Log4J implementation for PHP.  There are some naming
conventions which I am concerned will cause existing userspace class issues.
If you are familiar with Log4J, the following  example class names won't be
new to you:

 

Agent

Logger

Appender

Constants

FileAppender

 

And the list goes on.  I have attached a text file with all 1.4
specifications of log4j.  I considered log4p_* as a prefix for all class
names, but I am concerned for Java developers moving to PHP who are familiar
with the standard already in place.

 

If you have any insight into this issue, I would appreciate feedback.

 

Thanks,

 

Will Fitch

Zend
<http://www.zend.com/store/education/certification/authenticate.php?ClientCa
ndidateID=ZEND001989&RegistrationID=211155268>  Certified Engineer

---

## #31285 — Richard Lynch — 2007-07-27T03:42:15+00:00

URL: https://externals.io/message/31277#31285 · In reply to: #31277

> And the list goes on.  I have attached a text file with all 1.4
> specifications of log4j.  I considered log4p_* as a prefix for all
> class
> names, but I am concerned for Java developers moving to PHP who are
> familiar
> with the standard already in place.

If we need another logging class, and if it's going to co-exist nicely
with other packages, I'd really recommend just using the log4p_*
prefix.

Anybody not bright enough to figure it out from the kind of
Documentation PHP is known for is already in much deeper trouble. :-)

I personally don't think any new PECL stuff should go in without some
kind of agreed-upon prefix.

And the PECL list is almost-for-sure the right place to take this,
come to think of it.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

---

## #31303 — Will Fitch — 2007-07-27T13:23:20+00:00

URL: https://externals.io/message/31277#31303 · In reply to: #31285

I agree on both the naming convention (log4j_*), as well as the standard
naming convention.  There seems to be plenty of sources to suggest different
things, but no official declaration within PECL.



>
> 
> > […]
>
> If we need another logging class, and if it's going to co-exist nicely
> with other packages, I'd really recommend just using the log4p_*
> prefix.
>
> Anybody not bright enough to figure it out from the kind of
> Documentation PHP is known for is already in much deeper trouble. :-)
>
> I personally don't think any new PECL stuff should go in without some
> kind of agreed-upon prefix.
>
> And the PECL list is almost-for-sure the right place to take this,
> come to think of it.
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
>


-- 
Will Fitch
Zend Certified Engineer
931.205.8427

---

## #31327 — Will Fitch — 2007-07-30T18:57:17+00:00

URL: https://externals.io/message/31277#31327

Thanks, Marcus.  I finally found this documentation on PECL by using Google
site:pecl.php.net.

I appreciate the insight.



>
>  Hello Will,
>
>
>   our CODING_STANDARDS says: Classes should be given descriptive
> names...Each word should start with a capital letter...without
> underscores...The class name should be prefixed with the 'parent set' (e.g.
> the name of the extension)).
>
>
> -> Log4PLogger or Log4pLogger
>
>
> marcus
>
>
> Thursday, July 26, 2007, 1:20:46 AM, you wrote:
>
>
> > […]
>
> Hello All,
>
>
>
> I am continuing my Log4J implementation for PHP.  There are some naming
> conventions which I am concerned will cause existing userspace class issues.
>  If you are familiar with Log4J, the following  example class names won't be
> new to you:
>
>
>
> Agent
>
> Logger
>
> Appender
>
> Constants
>
> FileAppender
>
>
>
> And the list goes on.  I have attached a text file with all 1.4specifications of log4j.  I considered log4p_* as a prefix for all class
> names, but I am concerned for Java developers moving to PHP who are familiar
> with the standard already in place.
>
>
>
> If you have any insight into this issue, I would appreciate feedback.
>
>
>
> Thanks,
>
>
>
> Will Fitch
>
> Zend Certified Engineer<http://www.zend.com/store/education/certification/authenticate.php?ClientCandidateID=ZEND001989&RegistrationID=211155268>
>
>
>
>
>
> Best regards,
>
>  Marcus
>



-- 
Will Fitch
Zend Certified Engineer
931.205.8427

---

## #31337 — johannes@php.net — 2007-07-31T00:23:54+00:00

URL: https://externals.io/message/31277#31337 · In reply to: #31327

Hi Will,


> Thanks, Marcus.  I finally found this documentation on PECL by using Google
> site:pecl.php.net.
> 
> I appreciate the insight.

it's also part of the PHP Source distribution and CVS:
http://cvs.php.net/viewvc.cgi/php-src/CODING_STANDARDS?revision=1.36&view=markup

In the source there are also a few other READMEs which might be
interesting (stuff about the build system, parameter parsing API, etc.)

And yes, it might be hard when starting with PECL as point of view, but
well, PECL is an offspring of the php-src and most docs (as long as
stuff is documented at all) is at the source :-)

johannes
