[arquillian-issues] [JBoss JIRA] Commented: (ARQAJO-67) Reduce logging levels

Karel Piwko (JIRA) jira-events at lists.jboss.org
Wed Jul 13 02:59:23 EDT 2011


    [ https://issues.jboss.org/browse/ARQAJO-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613863#comment-12613863 ] 

Karel Piwko commented on ARQAJO-67:
-----------------------------------

Especially 
{code}
08:56:45.548 INFO - Command request: runScript[/*
 * JBoss, Home of Professional Open Source
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
var Ajocado = Ajocado || {};

Ajocado.extend = function(child, parent) {
        var F = function() {};
    F.prototype = parent.prototype;
    child.prototype = new F();
    child._superClass = parent.prototype;
    child.prototype.constructor = child;
};

Ajocado.Page = Ajocado.Page || {};

Ajocado.Page.RequestGuard = {

        requestDone : "HTTP",

        getRequestDone : function() {
                return this.requestDone;
        },

        setRequestDone : function(requestType) {
                this.requestDone = requestType;
        },

        clearRequestDone : function() {
                var result = this.requestDone;
                this.requestDone = "NONE";
                return result;
        }
};
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
var Ajocado = Ajocado || {};

Ajocado.XHRWrapper = function() {
        this.xhr;
        this.responseText= "";
        this.responseXml= null;
        this.readyState= 0;
        this.status= 0;
        this.statusText= 0;
        this.onreadystatechange= null;
};

Ajocado.XHRWrapper.prototype.abort = function() {
    return this.xhr.abort();
};

Ajocado.XHRWrapper.prototype.open = function(method, url, asyncFlag, userName, password) {
    asyncFlag = (asyncFlag !== false);
        return this.xhr.open(method, url, asyncFlag, userName, password);
};

Ajocado.XHRWrapper.prototype.getAllResponseHeaders = function() {
    return this.xhr.getAllResponseHeaders();
};

Ajocado.XHRWrapper.prototype.getResponseHeader = function(name) {
    return this.xhr.getResponseHeader(name);
};

Ajocado.XHRWrapper.prototype.send = function(content) {
        return this.xhr.send(content);
};

Ajocado.XHRWrapper.prototype.setRequestHeader = function(name, value) {
        return this.xhr.setRequestHeader(name, value);
};

Ajocado.XHRWrapper.prototype.onreadystatechangeCallback = function(event) {
        return this.onreadystatechange.call(this.xhr, event);
}

if (window.ActiveXObject) {

        Ajocado.ActiveXObject = window.ActiveXObject;

        Ajocado.XHRActiveXObject = function(xhr) {
                Ajocado.XHRWrapper.call(this);
                this.xhr = xhr;
                var proxy = this;
                this.xhr.onreadystatechange = function() {
                        proxy.readyState = proxy.xhr.readyState;
                        if (proxy.readyState == 4) {
                                proxy.responseText = proxy.xhr.responseText;
                                proxy.responseXML  = proxy.xhr.responseXML;
                                proxy.status       = proxy.xhr.status;
                                proxy.statusText   = proxy.xhr.statusText;
                        }
                        if (proxy.onreadystatechange) proxy.onreadystatechangeCallback(event);
              };
        };

        Ajocado.extend(Ajocado.XHRActiveXObject, Ajocado.XHRWrapper);

        var ActiveXObject = function(type, location) {
                var realActiveXObject = (location) ? new Ajocado.ActiveXObject(type, location) : new Ajocado.ActiveXObject(type);

                type = type.toLowerCase();
                if (type == "msxml2.xmlhttp" || type == "microsoft.xmlhttp") {
                        var proxy = new Ajocado.XHRActiveXObject(realActiveXObject);
                } else {
                        var proxy = realActiveXObject;
                }

                return proxy;
        }

} else if (window.XMLHttpRequest) {

        Ajocado.XMLHttpRequest = window.XMLHttpRequest;

        var XMLHttpRequest = function() {
                Ajocado.XHRWrapper.call(this);
                this.xhr = new Ajocado.XMLHttpRequest();
        };

        Ajocado.extend(XMLHttpRequest, Ajocado.XHRWrapper);

        XMLHttpRequest.prototype.onreadystatechangeWrapper = function() {
                var self = this;

                return function(event) {
                        self.readyState = this.readyState;
                        if (self.readyState == 4) {
                                self.responseText = this.responseText;
                                self.responseXML  = this.responseXML;
                                self.status       = this.status;
                                self.statusText   = this.statusText;
                        }
                        if (self.onreadystatechange) self.onreadystatechangeCallback(event);
                };
        };

        XMLHttpRequest.prototype.open = function(method, url, asyncFlag, userName, password) {
                this.xhr.onreadystatechange = this.onreadystatechangeWrapper();
                Ajocado.XHRWrapper.prototype.open.call(this, method, url, asyncFlag, userName, password);
        }
}
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
var Ajocado = Ajocado || {};

Ajocado.XHRWrapperInjection = {
                onreadystatechangeCallback : Ajocado.XHRWrapper.prototype.onreadystatechangeCallback
};

Ajocado.XHRWrapper.prototype.onreadystatechangeCallback = function() {
        if (this.readyState == 4) {
                Ajocado.Page.RequestGuard.setRequestDone("XHR");
        }
        Ajocado.XHRWrapperInjection.onreadystatechangeCallback.call(this);
}, ] on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:45.987 INFO - Got result: OK on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:45.989 INFO - Command request: getEval[Ajocado.RequestInterceptor.clearRequestDone(), ] on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:46.523 INFO - Got result: OK,HTTP on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:46.525 INFO - Command request: click[xpath=//a[text()='Create new Pet'], ] on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:46.952 INFO - Got result: OK on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:46.955 INFO - Command request: waitForRequest[15000, ] on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:57.690 INFO - Got result: OK on session db5e0f72ff5d453bba3b457359e3f0cb
08:56:57.695 INFO - Command request: getEval[Ajocado.RequestInterceptor.clearRequestDone(), ] on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:00.648 INFO - Got result: OK,HTTP on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:00.650 INFO - Command request: type[xpath=//input[@name='name'], Doggie #5] on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:01.322 INFO - Got result: OK on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:01.324 INFO - Command request: type[xpath=//input[@name='weight'], 10.0] on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:01.758 INFO - Got result: OK on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:01.761 INFO - Command request: getEval[Ajocado === undefined || Ajocado.getPage() === undefined, ] on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:02.299 INFO - Got result: OK,true on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:02.301 INFO - Command request: waitForCondition[(selenium.browserbot.getCurrentWindow() != null)  && (selenium.browserbot.getCurrentWindow().document != null)  && (selenium.browserbot.getCurrentWindow().document.body != null), 30000] on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:02.720 INFO - Got result: OK on session db5e0f72ff5d453bba3b457359e3f0cb
08:57:02.723 INFO - Command request: runScript[/*
 * JBoss, Home of Professional Open Source
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
var Ajocado = Ajocado || {};

Ajocado.extend = function(child, parent) {
        var F = function() {};
    F.prototype = parent.prototype;
    child.prototype = new F();
    child._superClass = parent.prototype;
    child.prototype.constructor = child;
};

Ajocado.Page = Ajocado.Page || {};

Ajocado.Page.RequestGuard = {

        requestDone : "HTTP",

        getRequestDone : function() {
                return this.requestDone;
        },

        setRequestDone : function(requestType) {
                this.requestDone = requestType;
        },

        clearRequestDone : function() {
                var result = this.requestDone;
                this.requestDone = "NONE";
                return result;
        }
};
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
var Ajocado = Ajocado || {};

Ajocado.XHRWrapper = function() {
        this.xhr;
        this.responseText= "";
        this.responseXml= null;
        this.readyState= 0;
        this.status= 0;
        this.statusText= 0;
        this.onreadystatechange= null;
};

Ajocado.XHRWrapper.prototype.abort = function() {
    return this.xhr.abort();
};

Ajocado.XHRWrapper.prototype.open = function(method, url, asyncFlag, userName, password) {
    asyncFlag = (asyncFlag !== false);
        return this.xhr.open(method, url, asyncFlag, userName, password);
};

Ajocado.XHRWrapper.prototype.getAllResponseHeaders = function() {
    return this.xhr.getAllResponseHeaders();
};

Ajocado.XHRWrapper.prototype.getResponseHeader = function(name) {
    return this.xhr.getResponseHeader(name);
};

Ajocado.XHRWrapper.prototype.send = function(content) {
        return this.xhr.send(content);
};

Ajocado.XHRWrapper.prototype.setRequestHeader = function(name, value) {
        return this.xhr.setRequestHeader(name, value);
};

Ajocado.XHRWrapper.prototype.onreadystatechangeCallback = function(event) {
        return this.onreadystatechange.call(this.xhr, event);
}

if (window.ActiveXObject) {

        Ajocado.ActiveXObject = window.ActiveXObject;

        Ajocado.XHRActiveXObject = function(xhr) {
                Ajocado.XHRWrapper.call(this);
                this.xhr = xhr;
                var proxy = this;
                this.xhr.onreadystatechange = function() {
                        proxy.readyState = proxy.xhr.readyState;
                        if (proxy.readyState == 4) {
                                proxy.responseText = proxy.xhr.responseText;
                                proxy.responseXML  = proxy.xhr.responseXML;
                                proxy.status       = proxy.xhr.status;
                                proxy.statusText   = proxy.xhr.statusText;
                        }
                        if (proxy.onreadystatechange) proxy.onreadystatechangeCallback(event);
              };
        };

        Ajocado.extend(Ajocado.XHRActiveXObject, Ajocado.XHRWrapper);

        var ActiveXObject = function(type, location) {
                var realActiveXObject = (location) ? new Ajocado.ActiveXObject(type, location) : new Ajocado.ActiveXObject(type);

                type = type.toLowerCase();
                if (type == "msxml2.xmlhttp" || type == "microsoft.xmlhttp") {
                        var proxy = new Ajocado.XHRActiveXObject(realActiveXObject);
                } else {
                        var proxy = realActiveXObject;
                }

                return proxy;
        }

} else if (window.XMLHttpRequest) {

        Ajocado.XMLHttpRequest = window.XMLHttpRequest;

        var XMLHttpRequest = function() {
                Ajocado.XHRWrapper.call(this);
                this.xhr = new Ajocado.XMLHttpRequest();
        };

        Ajocado.extend(XMLHttpRequest, Ajocado.XHRWrapper);

        XMLHttpRequest.prototype.onreadystatechangeWrapper = function() {
                var self = this;

                return function(event) {
                        self.readyState = this.readyState;
                        if (self.readyState == 4) {
                                self.responseText = this.responseText;
                                self.responseXML  = this.responseXML;
                                self.status       = this.status;
                                self.statusText   = this.statusText;
                        }
                        if (self.onreadystatechange) self.onreadystatechangeCallback(event);
                };
        };

        XMLHttpRequest.prototype.open = function(method, url, asyncFlag, userName, password) {
                this.xhr.onreadystatechange = this.onreadystatechangeWrapper();
                Ajocado.XHRWrapper.prototype.open.call(this, method, url, asyncFlag, userName, password);
        }
}
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
var Ajocado = Ajocado || {};

Ajocado.XHRWrapperInjection = {
                onreadystatechangeCallback : Ajocado.XHRWrapper.prototype.onreadystatechangeCallback
};

Ajocado.XHRWrapper.prototype.onreadystatechangeCallback = function() {
        if (this.readyState == 4) {
                Ajocado.Page.RequestGuard.setRequestDone("XHR");
        }
        Ajocado.XHRWrapperInjection.onreadystatechangeCallback.call(this);
}, ] on session db5e0f72ff5d453bba3b457359e3f0cb
{code}

is extremely annoying.

> Reduce logging levels
> ---------------------
>
>                 Key: ARQAJO-67
>                 URL: https://issues.jboss.org/browse/ARQAJO-67
>             Project: Arquillian Ajocado
>          Issue Type: Feature Request
>          Components: junit, testng
>    Affects Versions: 1.0.0.Alpha2
>            Reporter: Karel Piwko
>            Assignee: Lukáš Fryč
>             Fix For: 1.0.0.Final
>
>
> Ajocado outputs many debug information under INFO logging level. This level should be reduced to debug or even debug/fine.
> It makes execution of the test slower and this information is not required until debugging. 
> It manifest namely with JUnit which redirects test output to console.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the arquillian-issues mailing list