Skip to content

Commit

Permalink
Refactor static initializer to member
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 21, 2021
1 parent b24d4d8 commit ca71768
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/main/php/util/log/ColoredConsoleAppender.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,14 @@
* @test xp://util.log.unittest.ColoredConsoleAppenderTest
*/
class ColoredConsoleAppender extends ConsoleAppender {
private static $DEFAULTS;
private static $DEFAULTS= [
LogLevel::INFO => '00;00',
LogLevel::WARN => '00;31',
LogLevel::ERROR => '01;31',
LogLevel::DEBUG => '00;34'
];
protected $colors= [];

static function __static() {
self::$DEFAULTS= [
LogLevel::INFO => '00;00',
LogLevel::WARN => '00;31',
LogLevel::ERROR => '01;31',
LogLevel::DEBUG => '00;34'
];
}

/**
* Constructor
*
Expand Down

0 comments on commit ca71768

Please sign in to comment.