-
Notifications
You must be signed in to change notification settings - Fork 616
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
[QUESTION] How to change the NLP dock logger ? #1323
Comments
I reopen this issue because I still don’t have the solution... Even using the Adding your own logger to the container example, the instance of my logger is still not active. Even copying the example, the custom logger didn’t work. I changed my code this way: import { dockStart } from '@nlpjs/basic';
import { MyCustomLoggerClass } from './some-file';
const dock = await dockStart(this.options.dock);
const container = dock.getContainer();
const manager = dock.get('nlp');
container.register('logger', new MyCustomLoggerClass());
manager.addCorpus(corpusFilePath);
await manager.train(); |
Hello, You can change the function that logs the neural trainer: const { dockStart } = require('@nlpjs/basic');
(async () => {
const config = {
settings: {
nlp: {
nlu: {
log: (status, time) => console.log(`custom log: ${status.iterations} ${status.error} ${time}ms`),
},
corpora: [
"./corpus-en.json"
]
}
},
use: ["Basic"]
}
const dock = await dockStart(config); |
I would like to change the dock logger so I can use my own
I use the example given here to register my own logger
But the logs still remain unchanged
The text was updated successfully, but these errors were encountered: