Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 436 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 436 Bytes

Logger

A minimal logger with a structured log format and replacable LoggingService which logs to console.

Usage

import {LoggerFactory, ILog} from "@ssv/ng2-core";

const id = "auth.service";

@Injectable()
export class AuthService {
	
	private logger: ILog;
	
	constructor(
		loggerFactory: LoggerFactory
	) {
		this.logger = loggerFactory.get(id);
	}
	
	login() {
		this.logger.debug("login", "msg goes here");
	}
	
}