You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by Rajat Khandelwal <ra...@gmail.com> on 2015/07/30 16:26:34 UTC

Re: Review Request 36940: LENS-666: Replace log4j.properties with logback.xml

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36940/
-----------------------------------------------------------

(Updated July 30, 2015, 7:56 p.m.)


Review request for lens.


Bugs: LENS-666
    https://issues.apache.org/jira/browse/LENS-666


Repository: lens


Description
-------

This task is to convert existing log4j.properties to logback.xml files.


Ran the following script:

```
import requests, sys
header = """
<?xml version="1.0" encoding="UTF-8"?>
<!--

  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.

-->
"""
with open(sys.argv[1]) as f:
	lines = requests.post('http://logback.qos.ch/translator/dsl/propertiesToXML', data={'val':f.read()}).text.split("\n")
	print header + "\n".join(lines[9:])
    
```
in the following way:

```

python ~/log4jtologback.py ./lens-cube/src/test/resources/log4j.properties > ./lens-cube/src/test/resources/logback.xml
python ~/log4jtologback.py ./lens-driver-hive/src/test/resources/log4j.properties > ./lens-driver-hive/src/test/resources/logback.xml
python ~/log4jtologback.py ./lens-query-lib/src/test/resources/log4j.properties > ./lens-query-lib/src/test/resources/logback.xml
python ~/log4jtologback.py ./lens-server/src/main/webapp/WEB-INF/log4j.properties > ./lens-server/src/main/webapp/WEB-INF/logback.xml
python ~/log4jtologback.py ./lens-server/src/test/resources/log4j.properties > ./lens-server/src/test/resources/logback.xml
python ~/log4jtologback.py ./tools/conf/client/log4j.properties > ./tools/conf/client/logback.xml
python ~/log4jtologback.py ./tools/conf/server/log4j.properties > ./tools/conf/server/logback.xml
python ~/log4jtologback.py ./tools/conf-pseudo-distr/client/log4j.properties > ./tools/conf-pseudo-distr/client/logback.xml
python ~/log4jtologback.py ./tools/conf-pseudo-distr/server/log4j.properties > ./tools/conf-pseudo-distr/server/logback.xml
```


Diffs
-----

  lens-cube/src/test/resources/log4j.properties deaf1e18e4f1ffdd45af87a212761717eaec2949 
  lens-driver-hive/src/test/resources/log4j.properties 2c2dc45a7bcfdb20c4a70899587b95bbb0218cc7 
  lens-query-lib/src/test/resources/log4j.properties a69d13ad0f41eff6dc0f6c6522c21d49ebe37bd8 
  lens-server/src/main/webapp/WEB-INF/log4j.properties f5fdffa1814834e5f9cd4395a25db7f94f6fb6b8 
  lens-server/src/test/resources/log4j.properties 9cc1e36f53cd070144517d7cb0d3a01a58e4ed5d 
  tools/conf-pseudo-distr/client/log4j.properties 3756cf70ab278f3483eecfd83fc4d837b7b5dfe5 
  tools/conf-pseudo-distr/server/log4j.properties 2b04ea51f64c842a2e597848299250ecaebfe81c 
  tools/conf/client/log4j.properties 3756cf70ab278f3483eecfd83fc4d837b7b5dfe5 
  tools/conf/server/log4j.properties 2b04ea51f64c842a2e597848299250ecaebfe81c 

Diff: https://reviews.apache.org/r/36940/diff/


Testing (updated)
-------

still unable to get logs per query.


Thanks,

Rajat Khandelwal