【ELK】5.spring boot日志集成ELK,搭建日志系统

阅读前必看:

ELK在docker下搭建步骤

spring boot集成es,CRUD操作完整版

==============================================

本章集成ELK到spring boot,搭建日志系统

即,使用ELK对spring cloud分布式服务器集群日志做收集、汇总、分析、统计和检索操作。

那对于spring boot服务的日志 和 ELK的对接,就是通过Logstash来完成。

那spring boot的日志,如何能让logstash收集到呢?

就是本章的内容

在Spring Boot当中,默认使用logback进行log操作。和其他日志工具如log4j一样,logback支持将日志数据通过提供IP地址、端口号,以Socket的方式远程发送。在Spring Boot中,通常使用logback-spring.xml来进行logback配置。

==============================================

一、spring boot中的相关配置

1.pom.xml依赖

要想将logback与Logstash整合,必须引入logstash-logback-encoder包。

<!-- logback 推送日志文件到logstash -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>5.1</version>
</dependency>

2.在resources下新建logback-spring.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" /> <appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>192.168.92.130:5044</destination> //logstash ip和暴露的端口,logback就是通过这个地址把日志发送给logstash
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder" />
</appender> <root level="INFO">
<appender-ref ref="LOGSTASH" />
<appender-ref ref="CONSOLE" />
</root>
</configuration>

3.application.properties文件添加配置

#logback对接logstash的日志配置文件
logging.config=classpath:logback-spring.xml

OK此时spring boot这边的配置就结束了

二、logstash相关配置

1.首先你已经成功搭建了ELK的环境,docker搭建ELK步骤可以参考文章头的链接。

2.自第一步的基础上,进入logstash容器内部

docker exec -it logstash /bin/bash

3.进入目录pipeline中

cd /usr/share/logstash/pipeline

4.修改logstash.conf文件

vi logstash.conf

将本文件的内容修改为:

input{
tcp { port => 5044
codec => json_lines
}
}
output{
elasticsearch{
hosts=>["http://192.168.92.130:9200"]
index => "user-%{+YYYY.MM.dd}"
}
stdout{codec => rubydebug}
}

修改完成,:wq保存并退出!

注释1:

  input

  通过tcp方式,logback将日志内容发送给了logstash,也就是logstash的日志来源input为logstash暴露的5044所接收到的日志信息。

  因为logstash为本服务所在的服务器上,所以未标明IP即代表logstash服务所在的服务器的IP。

注释2:

  output

  hosts标明logstash的输出端是存储到ES中,而ES的地址就是http://ES服务所在服务器IP:端口

  index代表 日志在ES中所创建的index名为  “user-2019-02-27” 这样的  每天创建新的index

  stdout标明 spring boot的日志不仅输出到ES中,还在logstash的控制台也会输出,这样有助于查看

5.退出容器,并重启logstash服务,并打开日志查看

exit
docker restart logstash
docker logs -f logstash

此时可以看到logstash的启动日志

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2019-02-27T02:27:18,327][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.5.4"}
[2019-02-27T02:27:19,454][WARN ][logstash.monitoringextension.pipelineregisterhook] xpack.monitoring.enabled has not been defined, but found elasticsearch configuration. Please explicitly set `xpack.monitoring.enabled: true` in logstash.yml
[2019-02-27T02:27:21,138][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://192.168.92.130:9200/]}}
[2019-02-27T02:27:21,564][WARN ][logstash.licensechecker.licensereader] Restored connection to ES instance {:url=>"http://192.168.92.130:9200/"}
[2019-02-27T02:27:21,789][INFO ][logstash.licensechecker.licensereader] ES Output version determined {:es_version=>6}
[2019-02-27T02:27:21,804][WARN ][logstash.licensechecker.licensereader] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-02-27T02:27:22,074][INFO ][logstash.monitoring.internalpipelinesource] Monitoring License OK
[2019-02-27T02:27:22,075][INFO ][logstash.monitoring.internalpipelinesource] Validated license for monitoring. Enabling monitoring pipeline.
[2019-02-27T02:27:26,124][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-02-27T02:27:26,300][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://192.168.92.130:9200/]}}
[2019-02-27T02:27:26,346][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://192.168.92.130:9200/"}
[2019-02-27T02:27:26,384][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2019-02-27T02:27:26,384][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-02-27T02:27:26,471][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2019-02-27T02:27:26,481][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://192.168.92.130:9200"]}
[2019-02-27T02:27:26,521][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"_default_"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2019-02-27T02:27:26,613][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:5044", :ssl_enable=>"false"}
[2019-02-27T02:27:27,111][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x3f9c0d16 run>"}
[2019-02-27T02:27:27,205][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-02-27T02:27:28,253][WARN ][logstash.outputs.elasticsearch] You are using a deprecated config setting "document_type" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Document types are being deprecated in Elasticsearch 6.0, and removed entirely in 7.0. You should avoid this feature If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=>"document_type", :plugin=><LogStash::Outputs::ElasticSearch bulk_path=>"/_xpack/monitoring/_bulk?system_id=logstash&system_api_version=2&interval=1s", hosts=>[http://192.168.92.130:9200], sniffing=>false, manage_template=>false, id=>"e9ec7881a954a6e97c29d4cbeb03d4e51feaacda627de4612a8fa1b48627670e", document_type=>"%{[@metadata][document_type]}", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_c3abebc4-4dff-40b7-834d-517734b43506", enable_metric=>true, charset=>"UTF-8">, workers=>1, template_name=>"logstash", template_overwrite=>false, doc_as_upsert=>false, script_type=>"inline", script_lang=>"painless", script_var_name=>"event", scripted_upsert=>false, retry_initial_interval=>2, retry_max_interval=>64, retry_on_conflict=>1, action=>"index", ssl_certificate_verification=>true, sniffing_delay=>5, timeout=>60, pool_max=>1000, pool_max_per_route=>100, resurrect_delay=>5, validate_after_inactivity=>10000, http_compression=>false>}
[2019-02-27T02:27:28,274][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50}
[2019-02-27T02:27:28,324][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://192.168.92.130:9200/]}}
[2019-02-27T02:27:28,345][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://192.168.92.130:9200/"}
[2019-02-27T02:27:28,378][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2019-02-27T02:27:28,379][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-02-27T02:27:28,420][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://192.168.92.130:9200"]}
[2019-02-27T02:27:28,476][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>".monitoring-logstash", :thread=>"#<Thread:0x53a8137b run>"}
[2019-02-27T02:27:28,484][INFO ][logstash.agent ] Pipelines running {:count=>2, :running_pipelines=>[:main, :".monitoring-logstash"], :non_running_pipelines=>[]}
[2019-02-27T02:27:29,098][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

可以看出logstash成功加载了刚刚修改的配置文件的内容,并且启动成功了。

三、启动spring boot服务,从spring boot控制台,logstash控制台,kibana上分别查看 日志信息

1.启动spring boot服务

在IDE上看到控制台打印的日志

  .   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.1.RELEASE) 2019-02-27 10:02:40.623 INFO 6072 --- [ restartedMain] com.sxd.swapping.SwappingApplication : Starting SwappingApplication on KYF1TJ5BDJ8ZCAS with PID 6072 (D:\document\IdeaProjects\swapping\target\classes started by Administrator in D:\document\IdeaProjects\swapping)
2019-02-27 10:02:40.624 INFO 6072 --- [ restartedMain] com.sxd.swapping.SwappingApplication : No active profile set, falling back to default profiles: default
2019-02-27 10:02:40.660 INFO 6072 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31330430: startup date [Wed Feb 27 10:02:40 CST 2019]; root of context hierarchy
2019-02-27 10:02:41.657 INFO 6072 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2019-02-27 10:02:41.680 INFO 6072 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Elasticsearch - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.GoodsStockDao.
2019-02-27 10:02:41.683 INFO 6072 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Elasticsearch - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.HuaYangAreaDao.
2019-02-27 10:02:41.711 INFO 6072 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2019-02-27 10:02:41.721 INFO 6072 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data JPA - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.esDao.BuilderDao.
2019-02-27 10:02:41.742 INFO 6072 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2019-02-27 10:02:41.752 INFO 6072 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.GoodsStockDao.
2019-02-27 10:02:41.753 INFO 6072 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.HuaYangAreaDao.
2019-02-27 10:02:41.753 INFO 6072 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.esDao.BuilderDao.
2019-02-27 10:02:42.231 INFO 6072 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ac0c60a7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-02-27 10:02:42.631 INFO 6072 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9666 (http)
2019-02-27 10:02:42.651 INFO 6072 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-02-27 10:02:42.652 INFO 6072 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.29
2019-02-27 10:02:42.656 INFO 6072 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_171\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_171\bin;C:\Program Files\Java\jdk1.8.0_171\jre\bin;D:\document\apache-maven-3.5.3\bin;D:\apps\Git\cmd;C:\Program Files\TortoiseSVN\bin;.]
2019-02-27 10:02:42.704 INFO 6072 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-02-27 10:02:42.704 INFO 6072 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2044 ms
2019-02-27 10:02:42.867 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet statViewServlet mapped to [/druid/*]
2019-02-27 10:02:42.868 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-02-27 10:02:42.873 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-02-27 10:02:42.873 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-02-27 10:02:42.873 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-02-27 10:02:42.873 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-02-27 10:02:42.874 INFO 6072 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webStatFilter' to urls: [/*]
2019-02-27 10:02:43.126 INFO 6072 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2019-02-27 10:02:43.141 INFO 6072 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2019-02-27 10:02:43.220 INFO 6072 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.16.Final}
2019-02-27 10:02:43.222 INFO 6072 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-02-27 10:02:43.252 INFO 6072 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
DEBUG - {conn-10001} connected
DEBUG - {conn-10002} connected
DEBUG - {conn-10003} connected
DEBUG - {conn-10004} connected
DEBUG - {conn-10005} connected
2019-02-27 10:02:43.608 INFO 6072 --- [ restartedMain] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
DEBUG - {conn-10005} pool-connect
2019-02-27 10:02:43.617 INFO 6072 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect
DEBUG - {conn-10005} pool-recycle
DEBUG - {conn-10005} pool-connect
DEBUG - {conn-10005} pool-recycle
2019-02-27 10:02:44.098 INFO 6072 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-02-27 10:02:44.544 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : no modules loaded
2019-02-27 10:02:44.546 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin]
2019-02-27 10:02:44.546 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2019-02-27 10:02:44.546 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2019-02-27 10:02:44.546 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : loaded plugin [org.elasticsearch.script.mustache.MustachePlugin]
2019-02-27 10:02:44.546 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : loaded plugin [org.elasticsearch.transport.Netty3Plugin]
2019-02-27 10:02:44.546 INFO 6072 --- [ restartedMain] o.elasticsearch.plugins.PluginsService : loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019-02-27 10:02:45.439 INFO 6072 --- [ restartedMain] o.s.d.e.c.TransportClientFactoryBean : adding transport node : 192.168.92.130:9300
2019-02-27 10:02:46.247 INFO 6072 --- [ restartedMain] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
2019-02-27 10:02:46.661 WARN 6072 --- [ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-02-27 10:02:46.721 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/createCode/getCode]}" onto public com.sxd.swapping.base.UniVerResponse<java.lang.String> com.sxd.swapping.controller.CreateCodeController.createCode()
2019-02-27 10:02:46.725 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/get],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.Builder> com.sxd.swapping.controller.ESBuilderController.get(java.lang.Long)
2019-02-27 10:02:46.726 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/delete],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.Builder> com.sxd.swapping.controller.ESBuilderController.delete(com.sxd.swapping.domain.Builder)
2019-02-27 10:02:46.726 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/save],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.Builder> com.sxd.swapping.controller.ESBuilderController.save(com.sxd.swapping.domain.Builder)
2019-02-27 10:02:46.727 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchNameByTerm],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchNameByTerm(java.lang.String)
2019-02-27 10:02:46.727 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchNumByRange],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchNumByRange(java.lang.Integer)
2019-02-27 10:02:46.727 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchByBool],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<org.springframework.data.domain.Page<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByBool(com.sxd.swapping.domain.Builder)
2019-02-27 10:02:46.727 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchAll],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchAll()
2019-02-27 10:02:46.728 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/findByStr],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.findByStr(java.lang.String)
2019-02-27 10:02:46.728 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchByIK],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByIK(java.lang.String,java.lang.String,java.lang.Integer)
2019-02-27 10:02:46.728 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchByPinYin],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByPinYin(java.lang.String)
2019-02-27 10:02:46.728 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchNameByMatch],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchNameByMatch(java.lang.String)
2019-02-27 10:02:46.729 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/es/searchByTimeRange],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByTimeRange(com.sxd.swapping.domain.Builder)
2019-02-27 10:02:46.731 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/txtUpload],methods=[POST],consumes=[multipart/form-data]}" onto com.sxd.swapping.base.UniVerResponse<java.lang.String> com.sxd.swapping.controller.FileDownloadAndUploadController.txtUpload(org.springframework.web.multipart.MultipartFile,java.lang.String)
2019-02-27 10:02:46.731 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/111]}" onto public void com.sxd.swapping.controller.FileDownloadAndUploadController.showTest()
2019-02-27 10:02:46.732 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test/download],methods=[GET]}" onto org.springframework.http.ResponseEntity<byte[]> com.sxd.swapping.controller.FileDownloadAndUploadController.download(java.lang.String)
2019-02-27 10:02:46.732 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/goods/stock/insert],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.GoodsStock> com.sxd.swapping.controller.GoodsStockController.insert(com.sxd.swapping.domain.GoodsStock)
2019-02-27 10:02:46.733 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/goods/stock/concurrentStock],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.Map<java.lang.Integer, java.lang.String>> com.sxd.swapping.controller.GoodsStockController.concurrentStock(com.sxd.swapping.domain.GoodsStock)
2019-02-27 10:02:46.736 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayang/update],methods=[PUT]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithJPA.update(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.736 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayang/huayangs],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithJPA.huayangs(java.lang.String)
2019-02-27 10:02:46.736 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayang],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithJPA.huayang(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.737 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayang/updates],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithJPA.updates(com.sxd.swapping.base.BatchBean)
2019-02-27 10:02:46.737 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayang/pages],methods=[GET]}" onto public com.sxd.swapping.base.PageResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithJPA.pages(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.739 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/update],methods=[PUT]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithMyBatis.update(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.739 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/insert],methods=[POST]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithMyBatis.insert(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.739 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/findBy3Page],methods=[GET]}" onto public com.sxd.swapping.base.PageResponse<com.sxd.swapping.base.HuaYangModelBean> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findByNameAndPersonAndCreateDatePage(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.740 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/oneHuaYang],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findOne(java.lang.String)
2019-02-27 10:02:46.740 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/findByNameLike],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findAll1(java.lang.String)
2019-02-27 10:02:46.740 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/findByNameLike2],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findAll2(java.lang.String)
2019-02-27 10:02:46.741 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/oneHuaYang],methods=[DELETE]}" onto public com.sxd.swapping.base.UniVerResponse<java.lang.String> com.sxd.swapping.controller.HuaYangApiWithMyBatis.deleteOne(java.lang.Long)
2019-02-27 10:02:46.741 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/findMap],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.Map<java.lang.String, java.lang.String>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findMap(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.741 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/huayangMybatis/findBy3],methods=[GET]}" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.base.HuaYangModelBean>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findByNameAndPersonAndCreateDate(com.sxd.swapping.domain.HuaYangArea)
2019-02-27 10:02:46.743 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources]}" onto public org.springframework.http.ResponseEntity<java.util.List<springfox.documentation.swagger.web.SwaggerResource>> springfox.documentation.swagger.web.ApiResourceController.swaggerResources()
2019-02-27 10:02:46.744 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/ui]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.UiConfiguration> springfox.documentation.swagger.web.ApiResourceController.uiConfiguration()
2019-02-27 10:02:46.745 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/security]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.SecurityConfiguration> springfox.documentation.swagger.web.ApiResourceController.securityConfiguration()
2019-02-27 10:02:46.747 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-02-27 10:02:46.747 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-02-27 10:02:46.901 INFO 6072 --- [ restartedMain] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2019-02-27 10:02:47.031 INFO 6072 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-02-27 10:02:47.264 INFO 6072 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31330430: startup date [Wed Feb 27 10:02:40 CST 2019]; root of context hierarchy
2019-02-27 10:02:47.320 INFO 6072 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-02-27 10:02:47.320 INFO 6072 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-02-27 10:02:47.338 INFO 6072 --- [ restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : Detected @ExceptionHandler methods in myControllerAdvice
2019-02-27 10:02:47.788 INFO 6072 --- [ restartedMain] o.s.ui.freemarker.SpringTemplateLoader : SpringTemplateLoader for FreeMarker: using resource loader [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31330430: startup date [Wed Feb 27 10:02:40 CST 2019]; root of context hierarchy] and template loader path [classpath:/templates/]
2019-02-27 10:02:47.788 INFO 6072 --- [ restartedMain] o.s.w.s.v.f.FreeMarkerConfigurer : ClassTemplateLoader for Spring macros added to FreeMarker configuration
2019-02-27 10:02:47.811 WARN 6072 --- [ restartedMain] o.s.b.a.f.FreeMarkerAutoConfiguration : Cannot find template location(s): [classpath:/templates/] (please add some templates, check your FreeMarker configuration, or set spring.freemarker.checkTemplateLocation=false)
2019-02-27 10:02:48.059 INFO 6072 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2019-02-27 10:02:48.096 INFO 6072 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2019-02-27 10:02:48.098 INFO 6072 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure
2019-02-27 10:02:48.106 INFO 6072 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]
2019-02-27 10:02:48.111 INFO 6072 --- [ restartedMain] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147483647
2019-02-27 10:02:48.111 INFO 6072 --- [ restartedMain] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2019-02-27 10:02:48.127 INFO 6072 --- [ restartedMain] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2019-02-27 10:02:48.173 INFO 6072 --- [ restartedMain] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2019-02-27 10:02:48.411 INFO 6072 --- [ restartedMain] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: insertUsingPOST_1
2019-02-27 10:02:48.413 INFO 6072 --- [ restartedMain] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: updateUsingPUT_1
2019-02-27 10:02:48.445 INFO 6072 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9666 (http) with context path ''
2019-02-27 10:02:48.447 INFO 6072 --- [ restartedMain] com.sxd.swapping.SwappingApplication : Started SwappingApplication in 8.49 seconds (JVM running for 9.504)

2.此时切换到xshell或者任何能查看docker启动logstash的工具上查看logstash的控制台

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
[2019-02-27T02:27:18,327][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.5.4"}
[2019-02-27T02:27:19,454][WARN ][logstash.monitoringextension.pipelineregisterhook] xpack.monitoring.enabled has not been defined, but found elasticsearch configuration. Please explicitly set `xpack.monitoring.enabled: true` in logstash.yml
[2019-02-27T02:27:21,138][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://192.168.92.130:9200/]}}
[2019-02-27T02:27:21,564][WARN ][logstash.licensechecker.licensereader] Restored connection to ES instance {:url=>"http://192.168.92.130:9200/"}
[2019-02-27T02:27:21,789][INFO ][logstash.licensechecker.licensereader] ES Output version determined {:es_version=>6}
[2019-02-27T02:27:21,804][WARN ][logstash.licensechecker.licensereader] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-02-27T02:27:22,074][INFO ][logstash.monitoring.internalpipelinesource] Monitoring License OK
[2019-02-27T02:27:22,075][INFO ][logstash.monitoring.internalpipelinesource] Validated license for monitoring. Enabling monitoring pipeline.
[2019-02-27T02:27:26,124][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-02-27T02:27:26,300][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://192.168.92.130:9200/]}}
[2019-02-27T02:27:26,346][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://192.168.92.130:9200/"}
[2019-02-27T02:27:26,384][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2019-02-27T02:27:26,384][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-02-27T02:27:26,471][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
[2019-02-27T02:27:26,481][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://192.168.92.130:9200"]}
[2019-02-27T02:27:26,521][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"_default_"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2019-02-27T02:27:26,613][INFO ][logstash.inputs.tcp ] Starting tcp input listener {:address=>"0.0.0.0:5044", :ssl_enable=>"false"}
[2019-02-27T02:27:27,111][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x3f9c0d16 run>"}
[2019-02-27T02:27:27,205][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-02-27T02:27:28,253][WARN ][logstash.outputs.elasticsearch] You are using a deprecated config setting "document_type" set in elasticsearch. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. Document types are being deprecated in Elasticsearch 6.0, and removed entirely in 7.0. You should avoid this feature If you have any questions about this, please visit the #logstash channel on freenode irc. {:name=>"document_type", :plugin=><LogStash::Outputs::ElasticSearch bulk_path=>"/_xpack/monitoring/_bulk?system_id=logstash&system_api_version=2&interval=1s", hosts=>[http://192.168.92.130:9200], sniffing=>false, manage_template=>false, id=>"e9ec7881a954a6e97c29d4cbeb03d4e51feaacda627de4612a8fa1b48627670e", document_type=>"%{[@metadata][document_type]}", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_c3abebc4-4dff-40b7-834d-517734b43506", enable_metric=>true, charset=>"UTF-8">, workers=>1, template_name=>"logstash", template_overwrite=>false, doc_as_upsert=>false, script_type=>"inline", script_lang=>"painless", script_var_name=>"event", scripted_upsert=>false, retry_initial_interval=>2, retry_max_interval=>64, retry_on_conflict=>1, action=>"index", ssl_certificate_verification=>true, sniffing_delay=>5, timeout=>60, pool_max=>1000, pool_max_per_route=>100, resurrect_delay=>5, validate_after_inactivity=>10000, http_compression=>false>}
[2019-02-27T02:27:28,274][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50}
[2019-02-27T02:27:28,324][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://192.168.92.130:9200/]}}
[2019-02-27T02:27:28,345][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://192.168.92.130:9200/"}
[2019-02-27T02:27:28,378][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2019-02-27T02:27:28,379][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
[2019-02-27T02:27:28,420][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["http://192.168.92.130:9200"]}
[2019-02-27T02:27:28,476][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>".monitoring-logstash", :thread=>"#<Thread:0x53a8137b run>"}
[2019-02-27T02:27:28,484][INFO ][logstash.agent ] Pipelines running {:count=>2, :running_pipelines=>[:main, :".monitoring-logstash"], :non_running_pipelines=>[]}
[2019-02-27T02:27:29,098][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
{
"level_value" => 20000,
"message" => "Starting SwappingApplication on KYF1TJ5BDJ8ZCAS with PID 6072 (D:\\document\\IdeaProjects\\swapping\\target\\classes started by Administrator in D:\\document\\IdeaProjects\\swapping)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.SwappingApplication",
"@timestamp" => 2019-02-27T02:02:40.623Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "No active profile set, falling back to default profiles: default",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.SwappingApplication",
"@timestamp" => 2019-02-27T02:02:40.624Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31330430: startup date [Wed Feb 27 10:02:40 CST 2019]; root of context hierarchy",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext",
"@timestamp" => 2019-02-27T02:02:40.660Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Multiple Spring Data modules found, entering strict repository configuration mode!",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationDelegate",
"@timestamp" => 2019-02-27T02:02:41.657Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Spring Data Elasticsearch - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.GoodsStockDao.",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport",
"@timestamp" => 2019-02-27T02:02:41.680Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Spring Data Elasticsearch - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.HuaYangAreaDao.",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport",
"@timestamp" => 2019-02-27T02:02:41.683Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Multiple Spring Data modules found, entering strict repository configuration mode!",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationDelegate",
"@timestamp" => 2019-02-27T02:02:41.711Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Spring Data JPA - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.esDao.BuilderDao.",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport",
"@timestamp" => 2019-02-27T02:02:41.721Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Multiple Spring Data modules found, entering strict repository configuration mode!",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationDelegate",
"@timestamp" => 2019-02-27T02:02:41.742Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.GoodsStockDao.",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport",
"@timestamp" => 2019-02-27T02:02:41.752Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.dao.jpa.HuaYangAreaDao.",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport",
"@timestamp" => 2019-02-27T02:02:41.753Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.sxd.swapping.esDao.BuilderDao.",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport",
"@timestamp" => 2019-02-27T02:02:41.753Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ac0c60a7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker",
"@timestamp" => 2019-02-27T02:02:42.231Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Tomcat initialized with port(s): 9666 (http)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.embedded.tomcat.TomcatWebServer",
"@timestamp" => 2019-02-27T02:02:42.631Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Starting service [Tomcat]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.apache.catalina.core.StandardService",
"@timestamp" => 2019-02-27T02:02:42.651Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Starting Servlet Engine: Apache Tomcat/8.5.29",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.apache.catalina.core.StandardEngine",
"@timestamp" => 2019-02-27T02:02:42.652Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\\Program Files\\Java\\jdk1.8.0_171\\bin;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Program Files\\Python36\\Scripts\\;C:\\Program Files\\Python36\\;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Java\\jdk1.8.0_171\\bin;C:\\Program Files\\Java\\jdk1.8.0_171\\jre\\bin;D:\\document\\apache-maven-3.5.3\\bin;D:\\apps\\Git\\cmd;C:\\Program Files\\TortoiseSVN\\bin;.]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.apache.catalina.core.AprLifecycleListener",
"@timestamp" => 2019-02-27T02:02:42.656Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Initializing Spring embedded WebApplicationContext",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]",
"@timestamp" => 2019-02-27T02:02:42.704Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Root WebApplicationContext: initialization completed in 2044 ms",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.context.ContextLoader",
"@timestamp" => 2019-02-27T02:02:42.704Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Servlet statViewServlet mapped to [/druid/*]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.ServletRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.867Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Servlet dispatcherServlet mapped to [/]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.ServletRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.868Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapping filter: 'characterEncodingFilter' to: [/*]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.FilterRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.873Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapping filter: 'hiddenHttpMethodFilter' to: [/*]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.FilterRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.873Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapping filter: 'httpPutFormContentFilter' to: [/*]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.FilterRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.873Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapping filter: 'requestContextFilter' to: [/*]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.FilterRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.873Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapping filter: 'webStatFilter' to urls: [/*]",
"thread_name" => "localhost-startStop-1",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.servlet.FilterRegistrationBean",
"@timestamp" => 2019-02-27T02:02:42.874Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Building JPA container EntityManagerFactory for persistence unit 'default'",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean",
"@timestamp" => 2019-02-27T02:02:43.126Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "HHH000204: Processing PersistenceUnitInfo [\n\tname: default\n\t...]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.hibernate.jpa.internal.util.LogHelper",
"@timestamp" => 2019-02-27T02:02:43.141Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "HHH000412: Hibernate Core {5.2.16.Final}",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.hibernate.Version",
"@timestamp" => 2019-02-27T02:02:43.220Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "HHH000206: hibernate.properties not found",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.hibernate.cfg.Environment",
"@timestamp" => 2019-02-27T02:02:43.222Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "HCANN000001: Hibernate Commons Annotations {5.0.1.Final}",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.hibernate.annotations.common.Version",
"@timestamp" => 2019-02-27T02:02:43.252Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "{dataSource-1} inited",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.alibaba.druid.pool.DruidDataSource",
"@timestamp" => 2019-02-27T02:02:43.608Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.hibernate.dialect.Dialect",
"@timestamp" => 2019-02-27T02:02:43.617Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Initialized JPA EntityManagerFactory for persistence unit 'default'",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean",
"@timestamp" => 2019-02-27T02:02:44.098Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "no modules loaded",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.544Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.546Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "loaded plugin [org.elasticsearch.join.ParentJoinPlugin]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.546Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.546Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "loaded plugin [org.elasticsearch.script.mustache.MustachePlugin]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.546Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "loaded plugin [org.elasticsearch.transport.Netty3Plugin]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.546Z,
"level" => "INFO"
}
{
"tags" => [
[0] "[_client_] "
],
"level_value" => 20000,
"message" => "loaded plugin [org.elasticsearch.transport.Netty4Plugin]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.elasticsearch.plugins.PluginsService",
"@timestamp" => 2019-02-27T02:02:44.546Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "adding transport node : 192.168.92.130:9300",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.data.elasticsearch.client.TransportClientFactoryBean",
"@timestamp" => 2019-02-27T02:02:45.439Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "HHH000397: Using ASTQueryTranslatorFactory",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.hibernate.hql.internal.QueryTranslatorFactoryInitiator",
"@timestamp" => 2019-02-27T02:02:46.247Z,
"level" => "INFO"
}
{
"level_value" => 30000,
"message" => "spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration",
"@timestamp" => 2019-02-27T02:02:46.661Z,
"level" => "WARN"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/createCode/getCode]}\" onto public com.sxd.swapping.base.UniVerResponse<java.lang.String> com.sxd.swapping.controller.CreateCodeController.createCode()",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.721Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/get],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.Builder> com.sxd.swapping.controller.ESBuilderController.get(java.lang.Long)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.725Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/delete],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.Builder> com.sxd.swapping.controller.ESBuilderController.delete(com.sxd.swapping.domain.Builder)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.726Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/save],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.Builder> com.sxd.swapping.controller.ESBuilderController.save(com.sxd.swapping.domain.Builder)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.726Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchNameByTerm],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchNameByTerm(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.727Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchNumByRange],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchNumByRange(java.lang.Integer)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.727Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchByBool],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<org.springframework.data.domain.Page<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByBool(com.sxd.swapping.domain.Builder)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.727Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchAll],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchAll()",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.727Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/findByStr],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.findByStr(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.728Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchByIK],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByIK(java.lang.String,java.lang.String,java.lang.Integer)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.728Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchByPinYin],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByPinYin(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.728Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchNameByMatch],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchNameByMatch(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.728Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/es/searchByTimeRange],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.Builder>> com.sxd.swapping.controller.ESBuilderController.searchByTimeRange(com.sxd.swapping.domain.Builder)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.729Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/test/txtUpload],methods=[POST],consumes=[multipart/form-data]}\" onto com.sxd.swapping.base.UniVerResponse<java.lang.String> com.sxd.swapping.controller.FileDownloadAndUploadController.txtUpload(org.springframework.web.multipart.MultipartFile,java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.731Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/test/111]}\" onto public void com.sxd.swapping.controller.FileDownloadAndUploadController.showTest()",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.731Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/test/download],methods=[GET]}\" onto org.springframework.http.ResponseEntity<byte[]> com.sxd.swapping.controller.FileDownloadAndUploadController.download(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.732Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/goods/stock/insert],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.GoodsStock> com.sxd.swapping.controller.GoodsStockController.insert(com.sxd.swapping.domain.GoodsStock)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.732Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/goods/stock/concurrentStock],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.Map<java.lang.Integer, java.lang.String>> com.sxd.swapping.controller.GoodsStockController.concurrentStock(com.sxd.swapping.domain.GoodsStock)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.733Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayang/update],methods=[PUT]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithJPA.update(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.736Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayang/huayangs],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithJPA.huayangs(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.736Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayang],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithJPA.huayang(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.736Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayang/updates],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithJPA.updates(com.sxd.swapping.base.BatchBean)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.737Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayang/pages],methods=[GET]}\" onto public com.sxd.swapping.base.PageResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithJPA.pages(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.737Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/update],methods=[PUT]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithMyBatis.update(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.739Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/insert],methods=[POST]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithMyBatis.insert(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.739Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/findBy3Page],methods=[GET]}\" onto public com.sxd.swapping.base.PageResponse<com.sxd.swapping.base.HuaYangModelBean> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findByNameAndPersonAndCreateDatePage(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.739Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/oneHuaYang],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<com.sxd.swapping.domain.HuaYangArea> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findOne(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.740Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/findByNameLike],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findAll1(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.740Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/findByNameLike2],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.domain.HuaYangArea>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findAll2(java.lang.String)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.740Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/oneHuaYang],methods=[DELETE]}\" onto public com.sxd.swapping.base.UniVerResponse<java.lang.String> com.sxd.swapping.controller.HuaYangApiWithMyBatis.deleteOne(java.lang.Long)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.741Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/findMap],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.Map<java.lang.String, java.lang.String>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findMap(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.741Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/huayangMybatis/findBy3],methods=[GET]}\" onto public com.sxd.swapping.base.UniVerResponse<java.util.List<com.sxd.swapping.base.HuaYangModelBean>> com.sxd.swapping.controller.HuaYangApiWithMyBatis.findByNameAndPersonAndCreateDate(com.sxd.swapping.domain.HuaYangArea)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.741Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/swagger-resources]}\" onto public org.springframework.http.ResponseEntity<java.util.List<springfox.documentation.swagger.web.SwaggerResource>> springfox.documentation.swagger.web.ApiResourceController.swaggerResources()",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.743Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/swagger-resources/configuration/ui]}\" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.UiConfiguration> springfox.documentation.swagger.web.ApiResourceController.uiConfiguration()",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.744Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/swagger-resources/configuration/security]}\" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.SecurityConfiguration> springfox.documentation.swagger.web.ApiResourceController.securityConfiguration()",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.745Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/error]}\" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.747Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped \"{[/error],produces=[text/html]}\" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.747Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping",
"@timestamp" => 2019-02-27T02:02:46.901Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.handler.SimpleUrlHandlerMapping",
"@timestamp" => 2019-02-27T02:02:47.031Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31330430: startup date [Wed Feb 27 10:02:40 CST 2019]; root of context hierarchy",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter",
"@timestamp" => 2019-02-27T02:02:47.264Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.handler.SimpleUrlHandlerMapping",
"@timestamp" => 2019-02-27T02:02:47.320Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.handler.SimpleUrlHandlerMapping",
"@timestamp" => 2019-02-27T02:02:47.320Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Detected @ExceptionHandler methods in myControllerAdvice",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver",
"@timestamp" => 2019-02-27T02:02:47.338Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "SpringTemplateLoader for FreeMarker: using resource loader [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31330430: startup date [Wed Feb 27 10:02:40 CST 2019]; root of context hierarchy] and template loader path [classpath:/templates/]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.ui.freemarker.SpringTemplateLoader",
"@timestamp" => 2019-02-27T02:02:47.788Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "ClassTemplateLoader for Spring macros added to FreeMarker configuration",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer",
"@timestamp" => 2019-02-27T02:02:47.788Z,
"level" => "INFO"
}
{
"level_value" => 30000,
"message" => "Cannot find template location(s): [classpath:/templates/] (please add some templates, check your FreeMarker configuration, or set spring.freemarker.checkTemplateLocation=false)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration",
"@timestamp" => 2019-02-27T02:02:47.811Z,
"level" => "WARN"
}
{
"level_value" => 20000,
"message" => "LiveReload server is running on port 35729",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.devtools.autoconfigure.OptionalLiveReloadServer",
"@timestamp" => 2019-02-27T02:02:48.059Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Registering beans for JMX exposure on startup",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.jmx.export.annotation.AnnotationMBeanExporter",
"@timestamp" => 2019-02-27T02:02:48.096Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Bean with name 'dataSource' has been autodetected for JMX exposure",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.jmx.export.annotation.AnnotationMBeanExporter",
"@timestamp" => 2019-02-27T02:02:48.098Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.pool:name=dataSource,type=DruidDataSource]",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.jmx.export.annotation.AnnotationMBeanExporter",
"@timestamp" => 2019-02-27T02:02:48.106Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Starting beans in phase 2147483647",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.context.support.DefaultLifecycleProcessor",
"@timestamp" => 2019-02-27T02:02:48.111Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Context refreshed",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper",
"@timestamp" => 2019-02-27T02:02:48.111Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Found 1 custom documentation plugin(s)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper",
"@timestamp" => 2019-02-27T02:02:48.127Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Scanning for api listing references",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "springfox.documentation.spring.web.scanners.ApiListingReferenceScanner",
"@timestamp" => 2019-02-27T02:02:48.173Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Generating unique operation named: insertUsingPOST_1",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator",
"@timestamp" => 2019-02-27T02:02:48.411Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Generating unique operation named: updateUsingPUT_1",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator",
"@timestamp" => 2019-02-27T02:02:48.413Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Tomcat started on port(s): 9666 (http) with context path ''",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.boot.web.embedded.tomcat.TomcatWebServer",
"@timestamp" => 2019-02-27T02:02:48.445Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "Started SwappingApplication in 8.49 seconds (JVM running for 9.504)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.SwappingApplication",
"@timestamp" => 2019-02-27T02:02:48.447Z,
"level" => "INFO"
}

根据logstash这边的日志打印,可以看到

spring boot这边的每一条日志,都被解析成了一条JSON字符串

{
"level_value" => 20000,
"message" => "Starting SwappingApplication on KYF1TJ5BDJ8ZCAS with PID 6072 (D:\\document\\IdeaProjects\\swapping\\target\\classes started by Administrator in D:\\document\\IdeaProjects\\swapping)",
"thread_name" => "restartedMain",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.SwappingApplication",
"@timestamp" => 2019-02-27T02:02:40.623Z,
"level" => "INFO"
}

本JSON字符串包含了

level_value  日志等级对应的数值

message  日志详细内容

thread_name  线程名

host    服务IP

port    端口号

logger_name  日志发起端

@timestamp  时间戳【这里的时间与北京时间差8个时区】

level    日志等级

3.对比两边日志同步的情况

先在spring boot这边调一个查询接口,底层使用mybatis查询,日志打印如下:

2019-02-27 11:10:25.101  INFO 6072 --- [nio-9666-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2019-02-27 11:10:25.101 INFO 6072 --- [nio-9666-exec-2] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2019-02-27 11:10:25.197 INFO 6072 --- [nio-9666-exec-2] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 96 ms
DEBUG - {conn-10005} pool-connect
2019-02-27 11:10:25.405 DEBUG 6072 --- [nio-9666-exec-2] c.s.s.d.m.H.selectByNameLike : ==> Preparing: SELECT * FROM hua_yang_area WHERE area_name like '%%'
DEBUG - {conn-10005, pstmt-20000} created. SELECT * FROM hua_yang_area WHERE area_name like '%%'
2019-02-27 11:10:25.994 DEBUG 6072 --- [nio-9666-exec-2] c.s.s.d.m.H.selectByNameLike : ==> Parameters:
DEBUG - {conn-10005, pstmt-20000} Parameters : []
DEBUG - {conn-10005, pstmt-20000} Types : []
DEBUG - {conn-10005, pstmt-20000} executed. 237.132773 millis. SELECT * FROM hua_yang_area WHERE area_name like '%%'
DEBUG - {conn-10005, pstmt-20000, rs-50000} open
DEBUG - {conn-10005, pstmt-20000, rs-50000} Header: [id, create_date, create_id, uid, update_date, update_id, area_name, area_person]
2019-02-27 11:10:26.259 DEBUG 6072 --- [nio-9666-exec-2] c.s.s.d.m.H.selectByNameLike : <== Total: 0
DEBUG - {conn-10005, pstmt-20000, rs-50000} closed
DEBUG - {conn-10005, pstmt-20000} clearParameters.
DEBUG - {conn-10005} pool-recycle

logstash控制台看到的对应日志如下:

{
"level_value" => 20000,
"message" => "Initializing Spring FrameworkServlet 'dispatcherServlet'",
"thread_name" => "http-nio-9666-exec-2",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]",
"@timestamp" => 2019-02-27T03:10:25.101Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "FrameworkServlet 'dispatcherServlet': initialization started",
"thread_name" => "http-nio-9666-exec-2",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.DispatcherServlet",
"@timestamp" => 2019-02-27T03:10:25.101Z,
"level" => "INFO"
}
{
"level_value" => 20000,
"message" => "FrameworkServlet 'dispatcherServlet': initialization completed in 96 ms",
"thread_name" => "http-nio-9666-exec-2",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.DispatcherServlet",
"@timestamp" => 2019-02-27T03:10:25.197Z,
"level" => "INFO"
}
{
"tags" => [
[0] "MYBATIS"
],
"level_value" => 10000,
"message" => "==> Preparing: SELECT * FROM hua_yang_area WHERE area_name like '%%' ",
"thread_name" => "http-nio-9666-exec-2",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.dao.mybatis.HuaYangAreaMapper.selectByNameLike",
"@timestamp" => 2019-02-27T03:10:25.405Z,
"level" => "DEBUG"
}
{
"tags" => [
[0] "MYBATIS"
],
"level_value" => 10000,
"message" => "==> Parameters: ",
"thread_name" => "http-nio-9666-exec-2",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.dao.mybatis.HuaYangAreaMapper.selectByNameLike",
"@timestamp" => 2019-02-27T03:10:25.994Z,
"level" => "DEBUG"
}
{
"tags" => [
[0] "MYBATIS"
],
"level_value" => 10000,
"message" => "<== Total: 0",
"thread_name" => "http-nio-9666-exec-2",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "com.sxd.swapping.dao.mybatis.HuaYangAreaMapper.selectByNameLike",
"@timestamp" => 2019-02-27T03:10:26.259Z,
"level" => "DEBUG"
}

再调用一个查询接口,目的是想spring boot控制台打印  报错时候的日志:

com.sxd.swapping.util.MyException: 错误 : [ areaName ] 不能为空!
at com.sxd.swapping.base.UniVerResponse.checkField(UniVerResponse.java:108)
at com.sxd.swapping.controller.HuaYangApiWithMyBatis.findByNameAndPersonAndCreateDate(HuaYangApiWithMyBatis.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2019-02-27 11:11:09.545 WARN 6072 --- [nio-9666-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: com.sxd.swapping.util.MyException: 错误 : [ areaName ] 不能为空!

然后看logstash控制台看到的对应日志:

{
"level_value" => 30000,
"message" => "Resolved exception caused by Handler execution: com.sxd.swapping.util.MyException: 错误 : [ areaName ] 不能为空!",
"thread_name" => "http-nio-9666-exec-3",
"host" => "192.168.92.1",
"port" => 53195,
"@version" => "1",
"logger_name" => "org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver",
"@timestamp" => 2019-02-27T03:11:09.545Z,
"level" => "WARN"
}

通过测试,发现spring boot和logstash两边日志同步完全没有问题!!!

4.最后,kibana查看日志是否存储到ES中,以及日志的查看展示

 访问kibana

http://192.168.92.130:5601/

在Discover查询 , 查询两个字:  错误

可以查找到spring boot刚刚测试的错误日志信息

可以看到index的名字叫 "user-2019.02.27"

【ELK】5.spring boot日志集成ELK,搭建日志系统

现在查看"user-2019.02.27"

有109条击中

【ELK】5.spring boot日志集成ELK,搭建日志系统

在visualize中查看ES中存储的所有index的图标展示效果

【ELK】5.spring boot日志集成ELK,搭建日志系统

可以修改展示效果  例如区域折线图

【ELK】5.spring boot日志集成ELK,搭建日志系统

上一篇:[iOS]从零开始开发一个即时通讯APP


下一篇:linux安装python