New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Logger service public available #50
Comments
import { Module } from 'nest.js';
import { Logger } from 'nest.js/common/services/logger.service'
@Module({
modules: []
})
export class ApplicationModule {
private logger: Logger;
constructor() {
this.logger = new Logger(ApplicationModule.name);
this.logger.log('Hello nest.js');
}
} @artaommahe you're welcome |
@cojack i know how to import directly from sources, but this |
Hi @artaommahe, |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
To prevent additional loggers usages make existing Logger service public available.
Also extend declaration for
INestMicroservice
withlogger
field to allowapp.logger.log(...)
usage on startup instead ofconsole.log('Microservice is listening on port 3000'))
from examples.Also made
logMessage
method public to print messages with custom colors.The text was updated successfully, but these errors were encountered: