Hi.

2012/8/31 Jiri Svoboda <[email protected]>:
> HI,
>
> Jakub wrote:
>> Not
>> sure if log_msg() is suitable for logging from the async framework.
>> Perhaps klog_printf() could do.
> Several points here:
> &nbsp;- log_msg() called from async framework introduces a dangerous 
> layer-reversal - lower layer - async - calls to higher level - log_msg() 
> (which depends on VFS), leading to the possibility of deadlocks
> &nbsp;- I don't think libraries should log anything to system logs, in 
> general, unless the logging is explicitly enabled for debugging purposes - I 
> have this from hands-on experience in Solaris
> &nbsp;- in case of libraries errors should be propagated to the caller, not 
> logged out of band and out of control of the caller
> &nbsp;- log_msg cannot be currently used in libraries because it does not 
> support contexts yet. It would clash with application using the same facility
In my logging branch [1] I did some improvements to the logging that
covers the problems mentioned above. It needs some cleaning but I am
planning to merge it some time next week.

I plan to document the features in the wiki in more detail, but
briefly it allows following:
- specify different logs - e.g. it is possible that each device in a
driver would have its own log (that could be, for example, printed to
a separate file)
- the different logs allows for logging for libraries as each library
could (on initialization) create its own log and use that instead of
the default one
- create hierarchy of these logs (e.g. have separate log for each USB
pipe of a USB device)
- specify reported level for each log at runtime - e.g. print all
devman messages but only fatal errors of certain driver etc.
- specify reported level for each log at boot time via GRUB parameters

Currently, everything is logged into a file but it shall not be that
difficult to add sending the messages to a different target, such as
socket, for example.

- Vojta

[1] https://code.launchpad.net/~vojtech-horky/helenos/logging
>
> Cheers
> Jiri
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to