Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-older committed Nov 20, 2023
1 parent 5bd6666 commit 31d35c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion last_commit.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c29f8e2ec6fa31c776a02ab199591cd57dc75759
5bd6666c5909e16789a58a55510c0f660bae0c86
7 changes: 3 additions & 4 deletions src/Unilog/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function logFile($message, $error_level, $source_line, $tag) {
}

if(!empty($this->destinations[$destination]['debug_line'])) {
$message = "($source_line) ".$message;
$message = "@$source_line ".$message;
}

$date_time_format = $this->destinations[$destination]['date_time_format'] ?? "H:i:s";
Expand Down Expand Up @@ -120,13 +120,12 @@ public function logTelegram($message, $error_level, $source_line, $tag) {
return false;
}

$search = array('_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!');
$replace = array('\_', '\*', '\[', '\]', '\(', '\)', '\~', '\`', '\>', '\#', '\+', '\-', '\=', '\|', '\{', '\}', '\.', '\!');

if(!empty($this->destinations[$destination]['debug_line'])) {
$message = "($source_line) ".$message;
}

$search = array('_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!');
$replace = array('\_', '\*', '\[', '\]', '\(', '\)', '\~', '\`', '\>', '\#', '\+', '\-', '\=', '\|', '\{', '\}', '\.', '\!');
$message = str_replace($search, $replace, $message);

if($this->telegram->sendMessage($chat_id, "`$header`\n$emoji $message", "MarkdownV2") === false) {
Expand Down

0 comments on commit 31d35c8

Please sign in to comment.