mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Colored logs
This commit is contained in:
1 parent
db41076ce5
commit
4488cc3960
3 files changed
+95
-13
No files matched your search
+3
-7
@@ -22,6 +22,7 @@ import sys
|
||||
import locale
|
||||
|
||||
from gns3server.server import Server
|
||||
from gns3server.web.logger import init_logger
|
||||
from gns3server.version import __version__
|
||||
|
||||
import logging
|
||||
@@ -85,12 +86,7 @@ def main():
|
||||
# user_log.addHandler(stream_handler)
|
||||
# user_log.propagate = False
|
||||
# END OLD LOG CODE
|
||||
root_log = logging.getLogger()
|
||||
root_log.setLevel(logging.DEBUG)
|
||||
console_log = logging.StreamHandler(sys.stdout)
|
||||
console_log.setLevel(logging.DEBUG)
|
||||
root_log.addHandler(console_log)
|
||||
user_log = root_log
|
||||
user_log = init_logger(logging.DEBUG, quiet=False)
|
||||
# FIXME END Temporary
|
||||
|
||||
user_log.info("GNS3 server version {}".format(__version__))
|
||||
@@ -111,7 +107,7 @@ def main():
|
||||
try:
|
||||
os.getcwd()
|
||||
except FileNotFoundError:
|
||||
log.critical("the current working directory doesn't exist")
|
||||
log.critical("The current working directory doesn't exist")
|
||||
return
|
||||
|
||||
# TODO: Renable console_bind_to_any when we will have command line parsing
|
||||
|
||||
Reference in new issue
Block a user