You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/04/10 14:49:45 UTC

[Bug 56382] New: Add logging of deployment time

https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

            Bug ID: 56382
           Summary: Add logging of deployment time
           Product: Tomcat 7
           Version: trunk
          Hardware: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: bgrh@mail.ru

Tomcat logs the start of the deployment directory, but doesn't log finish.
I've created the small patch, which logs when the particular deployment is
finished, with the deployment time.

So output will be like this:

Apr 10, 2014 4:26:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
C:\AAA\Tools\apache-tomcat-7.0.52\webapps\aaa-admin

....

Apr 10, 2014 4:31:10 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory
C:\AAA\Tools\apache-tomcat-7.0.52\webapps\aaa-admin has finished in 292,516 ms.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

--- Comment #6 from Danila Galimov <bg...@mail.ru> ---
Is it ok now?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

--- Comment #4 from Danila Galimov <bg...@mail.ru> ---
Created attachment 31511
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31511&action=edit
Proposed patch - corrected

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

Violeta Georgieva <vi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Violeta Georgieva <vi...@apache.org> ---
Thanks for the report and the patch. This has been fixed in trunk for 8.0.6 and
in 7.0.x for 7.0.54 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> ---
Comment on attachment 31506
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31506
Proposed patch

In reply to attachment 31506

>         if( log.isInfoEnabled() )
> +            startTime = System.currentTimeMillis();
>             log.info(sm.getString("hostConfig.deployDir",
>                     dir.getAbsolutePath()));

1. The above change breaks the code, because of missing '{' after an 'if'
above.

> System.currentTimeMillis() - startTime

2. Boxing and unboxing have to be explicit, per our coding rules.

3. This covers only 'deployDirectory(..)' method. What about the others?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

--- Comment #1 from Danila Galimov <bg...@mail.ru> ---
Created attachment 31506
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31506&action=edit
Proposed patch

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

Danila Galimov <bg...@mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31506|0                           |1
        is obsolete|                            |
  Attachment #31511|0                           |1
        is obsolete|                            |

--- Comment #5 from Danila Galimov <bg...@mail.ru> ---
Created attachment 31512
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31512&action=edit
Proposed patch - corrected 2

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56382] Add logging of deployment time

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56382

Danila Galimov <bg...@mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #3 from Danila Galimov <bg...@mail.ru> ---
(In reply to Konstantin Kolinko from comment #2)
> Comment on attachment 31506 [details]
> Proposed patch
> 
> In reply to attachment 31506 [details]
> 
> >         if( log.isInfoEnabled() )
> > +            startTime = System.currentTimeMillis();
> >             log.info(sm.getString("hostConfig.deployDir",
> >                     dir.getAbsolutePath()));
> 
> 1. The above change breaks the code, because of missing '{' after an 'if'
> above.
Fixed.

> > System.currentTimeMillis() - startTime
> 
> 2. Boxing and unboxing have to be explicit, per our coding rules.
Fixed.

> 3. This covers only 'deployDirectory(..)' method. What about the others?
Done for deployDirectory, deployWAR and deployDescriptor methods.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org