def set_format *args
      global, format = args.fetch_opts [nil], :type => :console, :time => ["%H:%M:%S", "%03d"]                  
      format = if format[:type] == :html; {
                    :caller => "<a class='l'>%f:%l</a> <a class='m'>:%m</a>", 
                    :format => "<div class='line'><a class='t'>%time</a> <a class='%mode'>%mode</m> [%caller]: <p>%text</p>%att</div>",
                    :att =>"<div class='att'><div class='hide'>+</div><pre>%s</pre></div>",
                    :serializer => RMTools::RMLogger::HTML
                  }; else {
                    :caller => "#{@c.gray('%f:%l')} #{@c.red_bold(':%m')}", 
                    :format => "%time %mode [%caller]: %text"
                  } end.merge format
      if global
        _set_format @default_format, format
      else
        _set_format(file_format={}, format)
        @file_formats[File.expand_path(caller[0].till ':')] = file_format
      end
    end
def set_format *args
      global, format = args.fetch_opts [nil], :type => :console, :time => ["%H:%M:%S", "%03d"]                  
      format = if format[:type] == :html; {
                    :caller => "<a class='l'>%f:%l</a> <a class='m'>:%m</a>", 
                    :format => "<div class='line'><a class='t'>%time</a> <a class='%mode'>%mode</m> [%caller]: <p>%text</p>%att</div>",
                    :att =>"<div class='att'><div class='hide'>+</div><pre>%s</pre></div>",
                    :serializer => RMTools::RMLogger::HTML
                  }; else {
                    :caller => "#{@c.gray('%f:%l')} #{@c.red_bold(':%m')}", 
                    :format => "%time %mode [%caller]: %text"
                  } end.merge format
      if global
        _set_format @default_format, format
      else
        _set_format(file_format={}, format)
        @file_formats[File.expand_path(caller[0].till ':')] = file_format
      end
    end
set any needed params, the rest will be set by default