[Ovirt-devel] [PATCH server] Add logging format to taskomatic
Jason Guiditta
jason.guiditta at gmail.com
Tue Feb 17 22:10:23 UTC 2009
ACK, this shows timestamp now, with one comment inline.
On Tue, Feb 17, 2009 at 4:23 PM, Ian Main <imain at redhat.com> wrote:
> Sadly there's a bug in rails that overrides the logger format causing
> the non-existant formatting we were seeing. This is ugly but fixes the
> issue.
>
> Signed-off-by: Ian Main <imain at redhat.com>
> ---
> src/task-omatic/taskomatic.rb | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
> index 65aac32..f6f7f39 100755
> --- a/src/task-omatic/taskomatic.rb
> +++ b/src/task-omatic/taskomatic.rb
> @@ -35,6 +35,19 @@ require 'task_vm'
> require 'task_storage'
> require 'vnc'
>
> +# This sad and pathetic readjustment to ruby logger class is
> +# required to fix the formatting because rails does the same
> +# thing but overrides it to just the message.
> +#
> +# See eg: http://osdir.com/ml/lang.ruby.rails.core/2007-01/msg00082.html
> +#
> +class Logger
> + def format_message(severity, timestamp, progname, msg)
> + "#{timestamp} (#{$$}) #{msg}\n"
Why not include severity here as in default logger, especially since it is
passed in?
>
> + end
> +end
> +
> +
> class TaskOmatic
>
> include MonitorMixin
> --
> 1.6.0.6
>
> _______________________________________________
> Ovirt-devel mailing list
> Ovirt-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/ovirt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090217/970b594b/attachment.htm>
More information about the ovirt-devel
mailing list