Examples of SyslogData


Examples of org.wso2.carbon.logging.service.data.SyslogData

          registry.rollbackTransaction();
          log.error("Unable to update the appender", e);
          throw e;
        }
      } else {
        SyslogData syslogData = new SyslogData(url, port, realm, userName, password);
        addSyslogConfig(syslogData);
      }
    } catch (RegistryException e) {
      log.error("Unable to update the appender", e);
      throw e;
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.SyslogData

        realm = config.getRealm();
        userName = config.getUserName();
        password = config.getPassword();
      }
   
      return new SyslogData(url, port, realm, userName, password);
    } catch (Exception e) {
      log.error("Unable get SyslogData ", e);
      throw e;
    }
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.SyslogData

    }
    return null;
  }

  public boolean isSysLogAppender(int tenantId) throws LogViewerException {
    SyslogData syslogData;
    if (!isSyslogOn()) {
      return false;
    }
    try {
      syslogData = getSyslogData();
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.SyslogData

    }
  }

  private InputStream getLogDataStream(String logFile, int tenantId, String productName)
      throws Exception {
    SyslogData syslogData = getSyslogData();
    String url = "";
    // manager can view all the products tenant information
    url = getLogsServerURLforTenantService(syslogData.getUrl(), logFile, tenantId, productName);
    String password = syslogData.getPassword();
    String userName = syslogData.getUserName();
    int port = Integer.parseInt(syslogData.getPort());
    String realm = syslogData.getRealm();
    URI uri = new URI(url);
    String host = uri.getHost();
    HttpClient client = new HttpClient();
    client.getState().setCredentials(new AuthScope(host, port, realm),
        new UsernamePasswordCredentials(userName, password));
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.SyslogData

  private SyslogData getSyslogData() throws Exception {
    if (isSyslogConfiguredInRegistry()) {
      return LoggingUtil.getSyslogData();
    } else {
      SyslogData syslogData = new SyslogData();
      SyslogConfiguration syslogConfig = SyslogConfigManager.loadSyslogConfiguration();
      syslogData.setUrl(syslogConfig.getSyslogHostURL());
      syslogData.setPort(syslogConfig.getPort());
      syslogData.setRealm(syslogConfig.getRealm());
      syslogData.setUserName(syslogConfig.getUserName());
      syslogData.setPassword(syslogConfig.getPassword());
      return syslogData;
    }
  }
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.