|
From: Maxime <ma...@ta...> - 2017-09-14 07:32:27
|
Watanabe Thank you for your email and your suggestion to add JSON as possible log format. This is indeed an interesting idea. Actually we did not plan to add support for json format in the near future, but we will surely keep the idea in mind and discuss about it. The ability to easily process and parse the json format is indeed a good point, although as pointed by Karthik, other formats would also have this feature. In the current versions, we try to keep the logging features of the Wrapper easy to configure for the users and we generally advise to use tools such as log4j for specific needs. Help on how to output JSON with log4j can easily be found on the internet. Please let us know if you have any other remarks or suggestions. Best Regards, Maxime On Thu, Sep 14, 2017 at 8:52 AM, Y.Watanabe <na...@gm...> wrote: > Hi. Sorry to late reply. > This is just a problem of log format choice. > I feel good json to log format, another one likes txt splitter by pipe. > And in the world, Json is the standard format. Elasticsearch, > fluentd,logstash... > I am waiting that JSW support json for one of the supported log format. > > > 2017年7月23日(日) 14:20 Karthik Kumar Viswanathan <kar...@gm...>: > >> It's a good idea, but I have these ideas on them: >> >> - JSON isn't an appendable format, and this sort of log will not be well >> formed JSON. >> - CSV and YAML are good ideas - and they do support incremental updates >> and parsing libraries are available. >> - TXT files do allow appending and incremental updates are possible - >> except, they require escaping \n s in Exceptions etc. >> >> On 23 July 2017 at 10:29, Y.Watanabe <na...@gm...> wrote: >> >>> Hi. >>> I hope that JSW have "JSON" format configuration on >>> "wrapper.console.format". >>> >>> Belong to "12-factor app" theory, (https://12factor.net/ ) >>> Our Java-Web application logs to STDOUT, >>> and JSW catches the stdout log, write into "wrapper.log" >>> >>> So, both of JSW log and application log into one file like below. >>> >>> STATUS | wrapper | 2015/11/01 13:45:33.560 | JVM start...... >>> {"severity":"INFO","datetime":"2015-11-01 17:05:27 >>> -0700","msg":"foobar"} >>> >>> But it is not convinient to use jq command line tool like this. >>> >>> $ cat test.log | jq . >>> parse error: Invalid numeric literal at line 1, column 7 >>> >>> If JSW log format support JSON, >>> >>> {"STATUS":"wrapper","datetime":"2015/11/01 13:45:33.560", "msg":"JVM >>> start."} >>> {"severity":"INFO","datetime":"2015-11-01 17:05:27 >>> -0700","msg":"foobar"} >>> >>> I can use "jq" or any other tool for json ! >>> >>> $ cat test.log | jq . >>> { >>> "STATUS": "wrapper", >>> "datetime": "2015/11/01 13:45:33.560", >>> "msg": "JVM start." >>> } >>> { >>> "severity": "INFO", >>> "datetime": "2015-11-01 17:05:27 -0700", >>> "msg": "foobar" >>> } >>> >>> >>> Regards. >>> >>> ---- >>> Watanabe. >>> >>> ------------------------------------------------------------ >>> ------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Wrapper-user mailing list >>> Wra...@li... >>> https://lists.sourceforge.net/lists/listinfo/wrapper-user >>> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot______ >> _________________________________________ >> Wrapper-user mailing list >> Wra...@li... >> https://lists.sourceforge.net/lists/listinfo/wrapper-user >> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > |