mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
VR: fix logging is not working and logs are not appended to /var/log/cloud.log (#4466)
This commit is contained in:
parent
daec77f2ef
commit
a368ba9def
@ -1019,10 +1019,6 @@ def main(argv):
|
|||||||
# The "GLOBAL" Configuration object
|
# The "GLOBAL" Configuration object
|
||||||
config = CsConfig()
|
config = CsConfig()
|
||||||
|
|
||||||
logging.basicConfig(filename=config.get_logger(),
|
|
||||||
level=config.get_level(),
|
|
||||||
format=config.get_format())
|
|
||||||
|
|
||||||
# Load stored ip addresses from disk to CsConfig()
|
# Load stored ip addresses from disk to CsConfig()
|
||||||
config.set_address()
|
config.set_address()
|
||||||
|
|
||||||
|
|||||||
@ -14,3 +14,12 @@
|
|||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import logging
|
||||||
|
from cs.CsConfig import CsConfig
|
||||||
|
|
||||||
|
config = CsConfig()
|
||||||
|
|
||||||
|
logging.basicConfig(filename=config.get_logger(),
|
||||||
|
level=config.get_level(),
|
||||||
|
format=config.get_format())
|
||||||
|
|||||||
@ -26,8 +26,6 @@ import os.path
|
|||||||
import configure
|
import configure
|
||||||
import json
|
import json
|
||||||
|
|
||||||
logging.basicConfig(filename='/var/log/cloud.log', level=logging.INFO, format='%(asctime)s %(filename)s %(funcName)s:%(lineno)d %(message)s')
|
|
||||||
|
|
||||||
# first commandline argument should be the file to process
|
# first commandline argument should be the file to process
|
||||||
argc = len(sys.argv)
|
argc = len(sys.argv)
|
||||||
if argc != 2 and argc != 3:
|
if argc != 2 and argc != 3:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user