def open(dev=nil, opts=nil)
      if open? then
        raise RuntimeError.new("The logger has already opened the log#{' file ' + @dev if String === @dev}")
      end
      dev, opts = nil, dev if Hash === dev
      dev ||= default_log_file(Options.get(:app, opts)) 
      FileUtils.mkdir_p(File.dirname(dev)) if String === dev
      # default is 4-file rotation @ 16MB each
      shift_age = Options.get(:shift_age, opts, 4)
      shift_size = Options.get(:shift_size, opts, 16 * 1048576)
      @logger = MultilineLogger.new(dev, shift_age, shift_size)
      @logger.level = Options.get(:debug, opts) ? Logger::DEBUG : Logger::INFO
      @logger.formatter = lambda do |severity, time, progname, msg|
        FORMAT % [
          progname || 'I',
          DateTime.now.strftime("%d/%b/%Y %H:%M:%S"),
          severity,
          msg]
      end
      @dev = dev
      @logger
    end
def open(dev=nil, opts=nil)
      if open? then
        raise RuntimeError.new("The logger has already opened the log#{' file ' + @dev if String === @dev}")
      end
      dev, opts = nil, dev if Hash === dev
      dev ||= default_log_file(Options.get(:app, opts)) 
      FileUtils.mkdir_p(File.dirname(dev)) if String === dev
      # default is 4-file rotation @ 16MB each
      shift_age = Options.get(:shift_age, opts, 4)
      shift_size = Options.get(:shift_size, opts, 16 * 1048576)
      @logger = MultilineLogger.new(dev, shift_age, shift_size)
      @logger.level = Options.get(:debug, opts) ? Logger::DEBUG : Logger::INFO
      @logger.formatter = lambda do |severity, time, progname, msg|
        FORMAT % [
          progname || 'I',
          DateTime.now.strftime("%d/%b/%Y %H:%M:%S"),
          severity,
          msg]
      end
      @dev = dev
      @logger
    end
Opens the log. The default log location is determined from the application name.
 The application name is the value of the +:app+ option, or +Jinx+ by default.
 For an application +MyApp+, the log location is determined as follows:
 * +/var/log/my_app.log+ for Linux
 * +%LOCALAPPDATA%\MyApp\log\MyApp.log+ for Windows
 * +./log/MyApp.log+ otherwise
 The default file must be creatable or writable. If the device argument is not
 provided and there is no suitable default log file, then logging is disabled.

 @param [String, IO, nil] dev the log file or device
 @param [Hash, nil] opts the logger options
 @option opts [String] :app the application name
 @option opts [Integer] :shift_age the number of log files retained in the rotation
 @option opts [Integer] :shift_size the maximum size of each log file
 @option opts [Boolean] :debug whether to include debug messages in the log file
 @return [MultilineLogger] the global logger