AnatolyRugalev / yii-insertDelayedBehavior

1 stars 1 forks source link

Changed logging code #4

Closed shoaibi closed 11 years ago

shoaibi commented 11 years ago

Defined a function called log() which would take care of adding proper category and message prefix if required instead of appending same data over and over.

shoaibi commented 11 years ago

Excuse the code formatting issues. I use Sublimt Text 2 and somehow that disagrees with github's way of formatting code.

AnatolyRugalev commented 11 years ago

I think there's no reason to use public function. We started making code DRY, so let's do that on 100% :100: :)

You may also include function from Issue #5 discuss

AnatolyRugalev commented 11 years ago

I recommend you to use PhpBeautifier plugin for ST2. I didn't use it, but try out

shoaibi commented 11 years ago

I think there's no reason to use public function.

As in: 1- No need to have a log() function OR 2- No need to make log() public?

If its #1 I think using a separate function to add in the repeated category and message prefix information falls under DRY.

You may also include function from Issue #5 discuss

Ya, saw that, added that. Shall i make a new PR?

Gonna try PhpBeautifier now and report back. Thanks.

AnatolyRugalev commented 11 years ago

No need to make log() public

AnatolyRugalev commented 11 years ago

I think its better to push it into this branch. I mean, add another one commit to this PR

shoaibi commented 11 years ago

Modified log() to be protected. Gonna delete this request and push directly to main repository.

Tried PHPBeautifer but didn't work well, now using phptidy instead.