Skip to content

Commit

Permalink
Merge pull request #11 from AthennaIO/develop
Browse files Browse the repository at this point in the history
feat: update @secjs/utils to v1.8.2
  • Loading branch information
jlenon7 authored Apr 7, 2022
2 parents 333b5b8 + d030984 commit cdcf259
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 130 deletions.
140 changes: 18 additions & 122 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/logger",
"version": "1.1.1",
"version": "1.1.2",
"description": "",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down Expand Up @@ -153,8 +153,8 @@
}
},
"dependencies": {
"@athenna/ioc": "1.0.9",
"@secjs/utils": "1.8.0",
"@athenna/ioc": "1.1.1",
"@secjs/utils": "1.8.2",
"chalk": "4.1.1",
"reflect-metadata": "0.1.13",
"tscpaths": "0.0.9"
Expand Down
4 changes: 1 addition & 3 deletions src/Logger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Chalk from 'chalk'
import { Is } from '@secjs/utils'
import { Color } from './Utils/Color'
import { Config, Is, Path } from '@secjs/utils'
import { DriverContract } from './Contracts/DriverContract'
import { DriverFactory } from 'src/Factories/DriverFactory'
import { FormatterContract } from './Contracts/FormatterContract'
Expand All @@ -12,8 +12,6 @@ export class Logger {
private driver: DriverContract

constructor(runtimeConfig: any = {}) {
new Config().safeLoad(Path.config('logging'))

this.runtimeConfig = runtimeConfig
this.channelName = 'default'
this.driver = DriverFactory.fabricate(this.channelName, this.runtimeConfig)
Expand Down
6 changes: 4 additions & 2 deletions tests/Unit/LoggerTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
*/

import { Logger } from '../../src/Logger'
import { Folder, Path } from '@secjs/utils'
import { Config, Folder, Path } from '@secjs/utils'

describe('\n LoggerTest', () => {
let logger: Logger

beforeAll(() => {
beforeAll(async () => {
new Folder(Path.tests('Stubs/config')).loadSync().copySync(Path.pwd('config'))

await new Config().safeLoad(Path.config('logging'))

logger = new Logger({ formatterConfig: { context: 'Context' } })
})

Expand Down

0 comments on commit cdcf259

Please sign in to comment.