Univention Bugzilla – Bug 52311
improve default behaviour of ucs-school-import
Last modified: 2020-11-04 08:14:47 CET
/usr/share/ucs-school-import/configs/global_defaults.json defines a default for logging as "logfile": "/var/log/univention/ucs-school-import.log", With this configuration and without overriding it in further config-files this will effectively log all activities of ucs-school-import on DEBUG level. APIs relying on ucs-school-import will also cause log entries. It has been observed that the log may grow quickly with several GB per day. As there is no logrotation implemented there is no pro-active countermeasure against filling the partition containing /var/log/univention. Although the documentation mentions that ucs-school-import.log will contain DEBUG it is doubtful that this notice will be taken into account for administration procedures. I see 3 options (increasing weight): - improve the documentation - reduce default logging to INFO and implement a centralized log control for ucs-school-import.log - implement configurable log rotation for ucs-school-import.log (should be the default for all components of delivered software)
(In reply to Dirk Ahrnke from comment #0) > /usr/share/ucs-school-import/configs/global_defaults.json defines a default > for logging as > > "logfile": "/var/log/univention/ucs-school-import.log", > > With this configuration and without overriding it in further config-files > this will effectively log all activities of ucs-school-import on DEBUG > level. I suggest to introduce new and separate configuration settings for a) log level of command line output b) log level of log file The current configuration option "verbose" is only for a) and is a boolean (True: DEBUG, False: INFO). > APIs relying on ucs-school-import will also cause log entries. That is an error in those APIs and cannot be fixed in the ucs-school-import code. > It has been observed that the log may grow quickly with several GB per day. > > As there is no logrotation implemented there is no pro-active countermeasure > against filling the partition containing /var/log/univention. The log files of the ucs-school-import are already rotated on a daily basis (/var/log/univentio/ucs-school-import.log.%Y-%m-%d). I haven't seen a requirement until now to rotate more often than that. If desired, the logs can be compressed after rotation by a cronjob. If the logfile is not rotated, then something else (APIs mentioned above?) than the ucs-school-import is writing to it, without rotating it. The ucs-school-import does rotate. > Although the documentation mentions that ucs-school-import.log will contain > DEBUG it is doubtful that this notice will be taken into account for > administration procedures. > > I see 3 options (increasing weight): > - improve the documentation What are you missing and where? > - reduce default logging to INFO and implement a centralized log control for > ucs-school-import.log * "reduce default logging to INFO": yes, and make configurable (see above) * "implement a centralized log control for ucs-school-import.log": that is already there, it seems that it is not used. > - implement configurable log rotation for ucs-school-import.log Log rotation already exists, although it's not configurable. Is that really required? The current setting is to rotate daily and keep 10000000 backups. Maybe that should be reduced. > (should be the default for all components of delivered software) Absolutely. Where are you missing it?