Examples of Log


Examples of com.liferay.portal.kernel.log.Log

    Bundle bundle = logEntry.getBundle();

    String symbolicName = StringUtil.replace(
      bundle.getSymbolicName(), StringPool.PERIOD, StringPool.UNDERLINE);

    Log log = LogFactoryUtil.getLog("osgi.logging." + symbolicName);

    String message = logEntry.getMessage();

    ServiceReference<?> serviceReference = logEntry.getServiceReference();

    if (serviceReference != null) {
      message += " " + serviceReference.toString();
    }

    if ((level == LogService.LOG_DEBUG) && log.isDebugEnabled()) {
      log.debug(message, logEntry.getException());
    }
    else if ((level == LogService.LOG_ERROR) && log.isErrorEnabled()) {
      log.error(message, logEntry.getException());
    }
    else if ((level == LogService.LOG_INFO) && log.isInfoEnabled()) {
      log.info(message, logEntry.getException());
    }
    else if ((level == LogService.LOG_WARNING) && log.isWarnEnabled()) {
      log.warn(message, logEntry.getException());
    }
  }
View Full Code Here

Examples of com.mimpidev.dev.debug.Log

    File tempXMLFile = new File (settingsDir+fileSystemSlash+"temp.xml");
    if (tempXMLFile.exists())
      tempXMLFile.delete();

        // Initializing debugOutput File
    debugOutput = new Log(settingsDir+fileSystemSlash+"debug.log","rw");
  }
View Full Code Here

Examples of com.skymobi.monitor.model.Log

        response.setContentType("file/txt;charset=utf-8");
        response.addHeader("content-disposition", String.format("attachment; filename=%s.txt", java.net.URLEncoder.encode("logs", "UTF-8")));
        response.setStatus(HttpServletResponse.SC_OK);

        while (cursor.hasNext()) {
            Log log = converter.read(Log.class, cursor.next());

            response.getWriter().println(log.toString());

        }


    }
View Full Code Here

Examples of com.sun.tools.javac.util.Log

    {
        if (options == null)
            return;

        final Options optionTable = Options.instance(context);
        Log log = Log.instance(context);

        Option[] recognizedOptions =
                Option.getJavacToolOptions().toArray(new Option[0]);
        OptionHelper optionHelper = new GrumpyHelper(log) {
            @Override
            public String get(Option option) {
                return optionTable.get(option.getText());
            }

            @Override
            public void put(String name, String value) {
                optionTable.put(name, value);
            }

            @Override
            public void remove(String name) {
                optionTable.remove(name);
            }
        };

        Iterator<String> flags = options.iterator();
        while (flags.hasNext()) {
            String flag = flags.next();
            int j;
            for (j=0; j<recognizedOptions.length; j++)
                if (recognizedOptions[j].matches(flag))
                    break;

            if (j == recognizedOptions.length) {
                if (fileManager.handleOption(flag, flags)) {
                    continue;
                } else {
                    String msg = log.localize(PrefixKind.JAVAC, "err.invalid.flag", flag);
                    throw new IllegalArgumentException(msg);
                }
            }

            Option option = recognizedOptions[j];
            if (option.hasArg()) {
                if (!flags.hasNext()) {
                    String msg = log.localize(PrefixKind.JAVAC, "err.req.arg", flag);
                    throw new IllegalArgumentException(msg);
                }
                String operand = flags.next();
                if (option.process(optionHelper, flag, operand))
                    // should not happen as the GrumpyHelper will throw exceptions
View Full Code Here

Examples of com.thinkgem.jeesite.modules.sys.entity.Log

          params.append((index++ == 0 ? "" : "&") + param + "=");
          params.append(StringUtils.abbr(StringUtils.endsWithIgnoreCase((String)param, "password")
              ? "" : request.getParameter((String)param), 100));
        }
       
        Log log = new Log();
        log.setType(ex == null ? Log.TYPE_ACCESS : Log.TYPE_EXCEPTION);
        log.setCreateBy(user);
        log.setCreateDate(new Date());
        log.setRemoteAddr(StringUtils.getRemoteAddr(request));
        log.setUserAgent(request.getHeader("user-agent"));
        log.setRequestUri(request.getRequestURI());
        log.setMethod(request.getMethod());
        log.setParams(params.toString());
        log.setException(ex != null ? ex.toString() : "");
        logDao.save(log);
       
        logger.info("save log {type: {}, loginName: {}, uri: {}}, ", log.getType(), user.getLoginName(), log.getRequestUri());
       
      }
    }
   
//    logger.debug("最大内存: {}, 已分配内存: {}, 已分配内存中的剩余空间: {}, 最大可用内存: {}",
View Full Code Here

Examples of com.toc.logging.Log

  public void init() {
    try {
      Configuration config = new Configuration();
      config.addWriter("Default", null, Log.CONSOLE|Log.FILE, Log.DEFAULT_OUTPUT, Log.DEFAULT_PATTERN,
          Log.DEFAULT_DATE_PATTERN, "TOC\\log", "TOC\\log\\history", "Log.log", 1, Log.DAILY, true, true);
      log = new Log(config);
    } catch(Exception e) {
      fail("Failed initial Test Console Logging");
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of com.vaadin.tests.util.Log

        });
        layout.addComponent(l);
        layout.addComponent(b);

        getMainWindow().addWindow(centered);
        log = new Log(5);
        addComponent(log);
        getMainWindow().addListener(new ClickListener() {

            @Override
            public void click(ClickEvent event) {
View Full Code Here

Examples of database.Log

    public void delLog(long id) {

        Session session = HibernateUtil.getSessionFactory().getCurrentSession();

        session.beginTransaction();
        Log Log = (Log) session.load(Log.class, id);
        session.delete(Log);

        session.getTransaction().commit();
    }
View Full Code Here

Examples of de.mhus.lib.logging.Log

  @Override
  public synchronized IConfig getConfig() {
    if (config == null ) {
         
      Log l = new ConsoleFactory("init",System.out);
      l.setTrace(true);
     
      if (defaultConfigFile != null) {
        l.t("Load Config","default config file",defaultConfigFile);
        File f = new File(defaultConfigFile);
        try {
          if (f.exists()) {
            config = MConfigFactory.getInstance().createConfigFor(f);
          } else {
            l.t("Load Config","default config file not exists");
          }
        } catch (Exception e) {
          l.t("Load Config",e);
        }
      }
     
      getArguments();
      if (args != null) {
        String path = args.getValue("m_config_file", 0);
        if (path != null) {
          l.t("Load Config","config from args",path);
          try {
            File f = new File(path);
            if (f.exists()) {
              config = MConfigFactory.getInstance().createConfigFor(f);
            } else {
              l.t("Load Config","config from args not exists");
            }
          } catch (Exception e) {
            l.t("Load Config",e);
          }
        }
        String[] a = args.getValues("m_config_arg");
        for (String a1 : a) {
          String k = MString.beforeIndex(a1, '=');
          String v = MString.afterIndex(a1, '=');
          try {
            l.t("Load Config","Overwrite key from args",k,v);
            config.setString(k, v);
          } catch (MException e) {}
        }
      } else
      if (System.getProperty("m_config_file") != null) {
        String path = System.getProperty("m_config_file");
        if (path != null) {
          l.t("Load Config","config from env",path);
          try {
            File f = new File(path);
            if (f.exists()) {
              config = MConfigFactory.getInstance().createConfigFor(f);
            } else {
              l.t("Load Config","config from env not exists");
            }
          } catch (Exception e) {
            l.t("Load Config",e);
          }
        }       
      }
     
      if (config == null) {
        l.t("Load Config","Empty Config");
        config = new HashConfig();
      }
    }

    return config;
View Full Code Here

Examples of functions.basic.Log

        this.semaphore = semaphore;
    }

    public void run() {
        for (int index = 0; index < task.count && !isInterrupted(); index++) {
            Function log = new Log(1 + random() * 9);
            double leftBorder = random() * 100;
            double rightBorder = random() * 100 + 100;
            double delta = random();
            try {
                semaphore.beginWrite();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.