On Sat, 26 May 2012 20:44:40 +0200 Martin Minarik <[email protected]> wrote:
> --- > src/log.c | 85 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > src/log.h | 36 ++++++++++++++++++++++++++ > 2 files changed, 121 insertions(+), 0 deletions(-) > create mode 100644 src/log.c > create mode 100644 src/log.h > Hi Martin, this whole Weston series is messy, because it has patches spread over more emails than there are supposed to be commits. Could you re-send this as complete patches with "v2" on the subject-prefix and some comments on what is different to the first series, please? I also have some feedback first. Drop W_PRINTF macro, and just use weston_log(). That macro offers no additional information to the log, and will only confuse programmers since there would be two names for the exact same function. I was going to suggest that Weston writes its log by default to stderr, and there would be a command line option for giving a file name. If the file name is given, logging goes to that file instead. As I often run Weston by hand on the command line, I would like it to not print logs into stderr, when logging into a file, so I can see the messages from weston-spawned clients. The file should be opened in append mode, until (if) we implement some log file rotation. In this patch you are using function pointers like in libwayland, but I think you can do this simpler here, and just always vfprintf(weston_log_file, ...) where FILE *weston_log_file = stderr; and the open log file function just sets that variable. Thanks, pq _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
