Skip to content

Commit

Permalink
Merge pull request #15 from SecJS/refactor/len-impl-config-utils
Browse files Browse the repository at this point in the history
refactor: implement config class from utils
  • Loading branch information
jlenon7 authored Mar 6, 2022
2 parents cefa284 + aae370b commit 642941c
Show file tree
Hide file tree
Showing 17 changed files with 703 additions and 71 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,8 @@ export default {
> With the config/logging file created you can use Log and Logger classes to start logging.
```ts
import { Config } from '@secjs/config'
import { Log, Logger, Color } from '@secjs/logger'

// First you need to instantiate Config class and call loadSync method to load configuration files
new Confg().loadSync()

// Log and Logger will always use the default values of channel inside config/logging, the default channel in here is "application".
Log.log('Hello World!')
// [SecJS] - PID: 38114 - dd/mm/yyyy, hh:mm:ss PM [Logger] Hello World! +0ms
Expand Down Expand Up @@ -218,6 +214,4 @@ logger.channel('mychannel').success('Hello World!!', options)

---

## License

Made with 🖤 by [jlenon7](https://github.com/jlenon7) :wave:
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export * from './src/Formatters/JsonFormatter'
export * from './src/Formatters/DebugFormatter'
export * from './src/Formatters/ContextFormatter'

export * from './src/utils/Color'
export * from './src/utils/format'
export * from './src/utils/getTimestamp'
export * from './src/Utils/Color'
export * from './src/Utils/format'
export * from './src/Utils/getTimestamp'

export * from './src/Log'
export * from './src/Logger'
Loading

0 comments on commit 642941c

Please sign in to comment.