Skip to content

Commit

Permalink
[#14523] - Removed syslog formatter; Corrected logging under syslog
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Nov 11, 2019
1 parent 4f2d159 commit 339333e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 169 deletions.
19 changes: 7 additions & 12 deletions phalcon/Logger/Adapter/Syslog.zep
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Syslog extends AbstractAdapter
*
* @var string
*/
protected defaultFormatter = "Syslog";
protected defaultFormatter = "Line";

/**
* @var int
Expand Down Expand Up @@ -101,15 +101,10 @@ class Syslog extends AbstractAdapter
bool opened;

let formatter = this->getFormatter(),
message = formatter->format(item);

if typeof message !== "array" {
throw new Exception("The formatted message is not valid");
}

let name = this->name,
facility = this->facility,
option = this->option;
message = formatter->format(item),
name = this->name,
facility = this->facility,
option = this->option;

let result = openlog(name, option, facility);

Expand All @@ -125,9 +120,9 @@ class Syslog extends AbstractAdapter

let opened = true,
this->opened = opened,
level = this->logLevelToSyslog(message[1]);
level = this->logLevelToSyslog(item->getType());

syslog(level, message[1]);
syslog(level, message);
}

/**
Expand Down
39 changes: 0 additions & 39 deletions phalcon/Logger/Formatter/Syslog.zep

This file was deleted.

37 changes: 0 additions & 37 deletions tests/unit/Logger/Formatter/Syslog/FormatCest.php

This file was deleted.

81 changes: 0 additions & 81 deletions tests/unit/Logger/Formatter/Syslog/InterpolateCest.php

This file was deleted.

0 comments on commit 339333e

Please sign in to comment.