OpenNMT Forum

How to add info and error logs to a file when running opennmt py translation SERVER?

Is it by adding log_file in available_model/conf.json individually for each model ?
Anyhow Can i add a global logger, that adds all logs a file?

@vince62s @guillaumekln

I think this is what you’re looking for.

thanks @francoishernandez
do i have to add this log_file in conf.json file for each model?? And cant i set multile file_log level like error, info etc .?

-log_file and -log_file_level are command line flags.

python -log_file my_logs.log

I think log levels are mutually exclusive, but nothing stops you from trying.