Skip to content

Commit

Permalink
fix(core): 🔊 print version
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymichel committed Apr 13, 2019
1 parent f54fd3d commit 24dd2ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ export class Core {
logLevel = 'off',
}: IBarbaOptions = {}
) {
// 0. Set logger level
// 0. Set logger level and print version
Logger.setLevel(debug === true ? 'debug' : logLevel);
this.logger.print(this.version);

// 1. Manage options
Object.keys(schema).forEach(k => {
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/modules/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ export class Logger {
this._source = source;
}

/**
* Permanent, unremovable log.
*/
public print(...objects: any[]): void {
this._log(console.info, LogLevels.off, objects);
}

/**
* Error log.
*/
Expand Down

0 comments on commit 24dd2ea

Please sign in to comment.