资源简介
logstash 原本是ruby编写的,现在出了java版本,相比ruby在java版本中增加了消息丢失队列,防止消息丢失
代码片段和文件信息
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License Version 2.0 (the
* “License“); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.dtstack.jlogstash;
import org.apache.commons.cli.CommandLine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.dtstack.jlogstash.assembly.AssemblyPipeline;
import com.dtstack.jlogstash.assembly.CmdLineParams;
import com.dtstack.jlogstash.exception.ExceptionUtil;
import com.dtstack.jlogstash.log.LogComponent;
import com.dtstack.jlogstash.log.LogbackComponent;
/**
*
* Reason: TODO ADD REASON(可选)
* Date: 2016年8月31日 下午1:24:26
* Company: www.dtstack.com
* @author sishu.yss
*
*/
public class Main {
private static final Logger logger = LoggerFactory.getLogger(Main.class);
private static AssemblyPipeline assemblyPipeline = new AssemblyPipeline();
private static LogComponent logbackComponent = new LogbackComponent();
public static void main(String[] args) {
try {
CommandLine cmdLine = OptionsProcessor.parseArg(args);
CmdLineParams.setLine(cmdLine);
//logger config
logbackComponent.setupLogger();
//assembly pipeline
assemblyPipeline.assemblyPipeline();
} catch (Exception e) {
logger.error(“jlogstash start error:{}“ExceptionUtil.getErrorMessage(e));
System.exit(-1);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-23 02:05 jlogstash-master\
文件 110 2018-08-23 02:05 jlogstash-master\.gitignore
文件 11357 2018-08-23 02:05 jlogstash-master\LICENSE
文件 2550 2018-08-23 02:05 jlogstash-master\README.md
文件 25 2018-08-23 02:05 jlogstash-master\TODO.md
文件 634 2018-08-23 02:05 jlogstash-master\assembly.xm
目录 0 2018-08-23 02:05 jlogstash-master\bin\
文件 912 2018-08-23 02:05 jlogstash-master\bin\jlogstash.sh
文件 6698 2018-08-23 02:05 jlogstash-master\example.yml
文件 4508 2018-08-23 02:05 jlogstash-master\index.html
文件 3197 2018-08-23 02:05 jlogstash-master\jlogstash.iml
目录 0 2018-08-23 02:05 jlogstash-master\lib\
文件 29 2018-08-23 02:05 jlogstash-master\lib\README.MD
目录 0 2018-08-23 02:05 jlogstash-master\logs\
文件 70 2018-08-23 02:05 jlogstash-master\logs\.gitignore
文件 1986 2018-08-23 02:05 jlogstash-master\params.json
目录 0 2018-08-23 02:05 jlogstash-master\plugin\
文件 29 2018-08-23 02:05 jlogstash-master\plugin\README.MD
目录 0 2018-08-23 02:05 jlogstash-master\plugin\filter\
文件 29 2018-08-23 02:05 jlogstash-master\plugin\filter\README.MD
目录 0 2018-08-23 02:05 jlogstash-master\plugin\input\
文件 28 2018-08-23 02:05 jlogstash-master\plugin\input\README.MD
目录 0 2018-08-23 02:05 jlogstash-master\plugin\output\
文件 29 2018-08-23 02:05 jlogstash-master\plugin\output\README.MD
文件 9610 2018-08-23 02:05 jlogstash-master\pom.xm
目录 0 2018-08-23 02:05 jlogstash-master\src\
目录 0 2018-08-23 02:05 jlogstash-master\src\main\
目录 0 2018-08-23 02:05 jlogstash-master\src\main\java\
目录 0 2018-08-23 02:05 jlogstash-master\src\main\java\com\
目录 0 2018-08-23 02:05 jlogstash-master\src\main\java\com\dtstack\
目录 0 2018-08-23 02:05 jlogstash-master\src\main\java\com\dtstack\jlogstash\
............此处省略114个文件信息
评论
共有 条评论