Skip to content

Commit 9fac2da

Browse files
committed
New Feature.
Changelog excerpt: - Added the ability to log outbound requests.
1 parent c2ad6a1 commit 9fac2da

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
111111
### v3.4.0
112112

113113
[2023.03.24; Bug-fix; Maikuolan]: Typo in the readFileContent call for the channels data; Fixed.
114+
115+
[2023.03.24; New Feature; Maikuolan]: Added the ability to log outbound requests.

assets/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Configuration defaults file (last modified: 2023.01.19).
10+
# This file: Configuration defaults file (last modified: 2023.03.24).
1111
##/
1212

1313
core:
@@ -20,6 +20,9 @@ core:
2020
error_log:
2121
type: "string"
2222
default: ""
23+
outbound_request_log:
24+
type: "string"
25+
default: ""
2326
truncate:
2427
type: "kb"
2528
default: "0KB"

src/Loader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,9 @@ public function __construct(
355355
/** Instantiate the request class. */
356356
$this->Request = new \Maikuolan\Common\Request();
357357
$this->Request->DefaultTimeout = $this->Configuration['core']['default_timeout'];
358+
if ($this->Configuration['core']['outbound_request_log'] !== '') {
359+
$this->Request->ObjLoggerFile = $this->buildPath($this->Configuration['core']['outbound_request_log']);
360+
}
358361
$ChannelsDataArray = [];
359362
$this->YAML->process($this->readFileContent($this->AssetsPath . 'channels.yml'), $ChannelsDataArray);
360363
$this->Request->Channels = $ChannelsDataArray ?: [];

0 commit comments

Comments
 (0)