You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/11/18 09:09:13 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4466: VR: fix logging is not working and logs are not appended to /var/log/cloud.log

DaanHoogland commented on a change in pull request #4466:
URL: https://github.com/apache/cloudstack/pull/4466#discussion_r525922764



##########
File path: systemvm/debian/opt/cloud/bin/update_config.py
##########
@@ -16,18 +16,18 @@
 # specific language governing permissions and limitations
 # under the License.
 
+import logging
+logging.basicConfig(filename='/var/log/cloud.log', level=logging.INFO, format='%(asctime)s  %(filename)s %(funcName)s:%(lineno)d %(message)s')
+

Review comment:
       not really helpfull, maybe. we can solve the pylint issue by tickering the order, something like:
   ```suggestion
   import sys
   import logging
   import subprocess
   import os
   import os.path
   import configure
   import json
   
   logging.basicConfig(filename='/var/log/cloud.log', level=logging.INFO, format='%(asctime)s  %(filename)s %(funcName)s:%(lineno)d %(message)s')
   
   from subprocess import PIPE, STDOUT
   ```
   Maybe with more `from x import y`'s. Or have some option on pylint.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org