@@ -152,9 +152,9 @@ Logging options:\n\
152152 --log-level=LEVEL Set log level ('debug', 'info' (default), 'warn',\n \
153153 or 'error').\n \
154154 --log-progress=VALUE Enable ('true') or disable ('false') progress\n \
155- logging. The default is 'auto' which will enable progress\n \
155+ logging. If set to 'auto' osm2pgsql will enable progress\n \
156156 logging on the console and disable it if the output is\n \
157- redirected to a file.\n \
157+ redirected to a file. Default: true. \n \
158158 --log-sql Enable logging of SQL commands for debugging.\n \
159159 --log-sql-data Enable logging of all data added to the database.\n \
160160 -v|--verbose Same as '--log-level=debug'.\n \
@@ -608,13 +608,11 @@ options_t::options_t(int argc, char *argv[]) : options_t()
608608 break ;
609609 case 401 : // --log-progress=VALUE
610610 if (std::strcmp (optarg, " true" ) == 0 ) {
611- log_progress = optarg;
612611 get_logger ().enable_progress ();
613612 } else if (std::strcmp (optarg, " false" ) == 0 ) {
614- log_progress = optarg;
615613 get_logger ().disable_progress ();
616614 } else if (std::strcmp (optarg, " auto" ) == 0 ) {
617- log_progress = optarg ;
615+ get_logger (). auto_progress () ;
618616 } else {
619617 throw std::runtime_error{
620618 " Unknown value for --log-progress option: {}" _format (
@@ -729,10 +727,4 @@ void options_t::check_options()
729727 " You have to set the config file with the -S|--style option." };
730728 }
731729 }
732-
733- if (log_progress.empty () && !get_logger ().show_progress ()) {
734- log_info (" Progress logging disabled because you are not logging to the "
735- " console." );
736- log_info (" Use --log-progress=true to override this." );
737- }
738730}
0 commit comments