@athenna/logger 1.3.6 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenna/logger",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "The Athenna logging solution. Log in stdout, files and buckets.",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",
@@ -47,10 +47,9 @@
47
47
  "./providers/LoggerProvider": "./src/Providers/LoggerProvider.js"
48
48
  },
49
49
  "dependencies": {
50
- "@athenna/common": "1.0.0",
51
- "@athenna/config": "1.1.9",
52
- "@athenna/ioc": "1.2.8",
53
- "axios": "0.26.1",
50
+ "@athenna/common": "1.0.2",
51
+ "@athenna/config": "1.2.1",
52
+ "@athenna/ioc": "1.3.0",
54
53
  "chalk": "5.0.1",
55
54
  "telegraf": "4.7.0"
56
55
  },
@@ -7,8 +7,7 @@
7
7
  * file that was distributed with this source code.
8
8
  */
9
9
 
10
- import axios from 'axios'
11
-
10
+ import { HttpClient } from '@athenna/common'
12
11
  import { Driver } from '#src/Drivers/Driver'
13
12
 
14
13
  export class DiscordDriver extends Driver {
@@ -36,7 +35,7 @@ export class DiscordDriver extends Driver {
36
35
 
37
36
  const formatted = this.format(level, message, true)
38
37
 
39
- return axios.post(this.configs.url, {
38
+ return HttpClient.builder(true).post(this.configs.url, {
40
39
  username: this.configs.username,
41
40
  content: formatted,
42
41
  })
@@ -7,8 +7,7 @@
7
7
  * file that was distributed with this source code.
8
8
  */
9
9
 
10
- import axios from 'axios'
11
-
10
+ import { HttpClient } from '@athenna/common'
12
11
  import { Driver } from '#src/Drivers/Driver'
13
12
 
14
13
  export class SlackDriver extends Driver {
@@ -36,6 +35,6 @@ export class SlackDriver extends Driver {
36
35
 
37
36
  const formatted = this.format(level, message, true)
38
37
 
39
- return axios.post(this.configs.url, { text: formatted })
38
+ return HttpClient.builder(true).post(this.configs.url, { text: formatted })
40
39
  }
41
40
  }
package/src/index.js CHANGED
@@ -166,7 +166,7 @@ export class Logger {
166
166
 
167
167
  let content = format(...args.filter(arg => arg !== undefined))
168
168
 
169
- const matches = content.match(/\({(.*?)} (.*?)\)/g)
169
+ const matches = content.match(/\({(.*?)} ([\s\S]*?)\)/g)
170
170
 
171
171
  if (!matches) {
172
172
  return content