Opened 13 years ago

Closed 13 years ago

#307 closed enhancement (fixed)

Devman and DDF-based drivers are too verbose

Reported by: Jiri Svoboda Owned by: Jiri Svoboda
Priority: major Milestone: 0.5.0
Component: helenos/srv/devman Version:
Keywords: Cc: vojtech.horky@…
Blocker for: Depends on:
See also:

Description

Devman and DDF-based drivers print too many debugging messages to the log. Before we can switch to starting devman by default (which is needed in order to port over essential drivers such as keyboard), we need to get rid of these.

Since the messages can be still useful for debugging, it would be ideal not to remove the messages, but rather print them conditionally.

Attachments (1)

devman_logging.patch (20.8 KB ) - added by Vojtech Horky 13 years ago.
Patch for conditional printing of devman messages

Download all attachments as: .zip

Change History (4)

by Vojtech Horky, 13 years ago

Attachment: devman_logging.patch added

Patch for conditional printing of devman messages

comment:1 by Vojtech Horky, 13 years ago

Cc: vojtech.horky@… added
Component: unspecifiedsrv/devman

Added patch to reduce number of messages printed by devman. I tried to use as simple approach as possible: the messages are divided into three groups (errors, informational and debugging) and depending on the initial settings, some of them are printed to the screen while others are suppressed (nevertheless, all of them are printed to log file in /log/devman). For the actual output, functions devman_log_error(), devman_log_info() and devman_log_debug() are used, all of them use printf-like semantics.

The same approach could be used for individual drivers as well. Then it might be worth putting it inside libdrv. The question is whether this is versatile enough. By the way, we are using such logging (though with 3 more levels) in our USB drivers and we are quite happy with it.

comment:2 by Jiri Svoboda, 13 years ago

Owner: set to Jiri Svoboda
Status: newaccepted

I am working on enhancing and integrating Vojta's patch. I moved the logging module to C library, simplified it and added more reporting levels. Also I am working on a specialized DDF function for driver logging.

comment:3 by Jiri Svoboda, 13 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in changeset:mainline,907. Now drivers can log with ddf_msg() and other servers with log_msg(). Currently verbosity level is configured in the driver and server source by calling ddf_log_init() and log_init(), respectively.

Reduced default verbosity of devman and DDF drivers, now they should mostly print just the banners. Devman is now started by default in init just after mounting the RAM disk.

Note: See TracTickets for help on using tickets.