Nir Soffer has uploaded a new change for review.

Change subject: log: Nicer logging format
......................................................................

log: Nicer logging format

Use nicer and more standard logging format, similar to engine log
format. Having similar logging formats should make it easier to debug
and support.

Here is an example log using the new format:

2016-09-19 00:02:25,291 INFO    [vds] (MainThread) (PID: 10281) I am the actual 
vdsm 4.18.999-578.git61bfe00.el7 voodoo6.tlv.redhat.com (3.10.0-489.el7.x86_64)
2016-09-19 00:02:25,291 INFO    [vds] (MainThread) VDSM will run with cpu 
affinity: frozenset([1])
2016-09-19 00:02:25,379 INFO    [storage.check] (MainThread) Starting check 
service
2016-09-19 00:02:25,384 INFO    [storage.Dispatcher] (MainThread) Starting 
StorageDispatcher...
2016-09-19 00:02:25,385 INFO    [storage.asyncevent] (check/loop) Starting 
<EventLoop running=True closed=False at 0x33716496>
2016-09-19 00:02:25,482 INFO    [dispatcher] (MainThread) Run and protect: 
registerDomainStateChangeCallback(callbackFunc=<functools.partial object at 
0x288f260>)
2016-09-19 00:02:25,482 INFO    [dispatcher] (MainThread) Run and protect: 
registerDomainStateChangeCallback, Return response: None
2016-09-19 00:02:25,485 INFO    [MOM] (MainThread) Preparing MOM interface
2016-09-19 00:02:25,486 INFO    [MOM] (MainThread) Using named unix socket 
/var/run/vdsm/mom-vdsm.sock
2016-09-19 00:02:25,487 INFO    [root] (MainThread) Unregistering all secrets
2016-09-19 00:02:25,491 INFO    [vds] (MainThread) Setting channels' timeout to 
30 seconds.
2016-09-19 00:02:25,493 INFO    [vds.MultiProtocolAcceptor] (MainThread) 
Listening at :::54321
2016-09-19 00:02:25,526 INFO    [vds] (clientIFinit) recovery: completed in 0s
2016-09-19 00:02:25,560 WARNING [storage.Multipath] (hsm/init) Map 
'360014052c81462a280847e8a6e3af8cd' has no slaves
2016-09-19 00:02:25,560 WARNING [storage.Multipath] (hsm/init) Map 
'36001405292bb96f19064f81b884fa63f' has no slaves
2016-09-19 00:02:27,115 INFO    [vds] (BindingXMLRPC) XMLRPC server running
2016-09-19 00:02:27,122 INFO    [health] (MainThread) Starting health monitor 
(interval=60)
2016-09-19 00:02:40,256 INFO    [ProtocolDetector.AcceptorImpl] (Reactor 
thread) Accepting connection from ::1:42888
2016-09-19 00:02:40,270 INFO    [ProtocolDetector.Detector] (Reactor thread) 
Detected protocol xml from ::1:42888
2016-09-19 00:02:40,270 INFO    [vds.XMLRPCServer] (BindingXMLRPC) Starting 
request handler for ::1:42888
2016-09-19 00:02:40,271 INFO    [vds.XMLRPCServer] (Thread-12) Request handler 
for ::1:42888 started
2016-09-19 00:02:40,272 INFO    [throttled] (Thread-12) Current getAllVmStats: 
{}
2016-09-19 00:02:40,272 INFO    [vds] (Thread-12) RPC call getAllVmStats 
finished (code=0) in 0.00 seconds

Unfinished: require updating all the tools parsing vdsm log.

Change-Id: I640c3c83db3b5818a08b4984d5358b1e27bf0ef3
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M static/etc/vdsm/logger.conf.in
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/64113/1

diff --git a/static/etc/vdsm/logger.conf.in b/static/etc/vdsm/logger.conf.in
index 34137ff..820fcb4 100644
--- a/static/etc/vdsm/logger.conf.in
+++ b/static/etc/vdsm/logger.conf.in
@@ -86,7 +86,7 @@
 format: %(message)s
 
 [formatter_long]
-format: 
%(threadName)s::%(levelname)s::%(asctime)s::%(module)s::%(lineno)d::%(name)s::(%(funcName)s)
 %(message)s
+format: %(asctime)s %(levelname)-7s [%(name)s] (%(threadName)s) %(message)s
 
 [formatter_sysform]
 format= vdsm %(name)s %(levelname)s %(message)s


-- 
To view, visit https://gerrit.ovirt.org/64113
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I640c3c83db3b5818a08b4984d5358b1e27bf0ef3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to