Skip to main content

How to track java Exceptions in Tomcat Log


We have monitoring large java application logs (Ex - Hotel Directory ) , there are many logs entry in our log file and can not figure out Java Exceptions by looking at catalina.out log file.

Using with tail and grep command in Linux, we can track Java Exception, This is very helpful to us Track exception in testing and production environment.

In Tomcat
tail -f catalina.out | grep -P "(WARN|ERROR|^\tat |Exception|^Caused by: |\t... \d+ more)"

In Any Java Application Logfile
tail -f logfile | grep -P "(WARN|ERROR|^\tat |Exception|^Caused by: |\t... \d+ more)"

Comments

Popular posts from this blog

is not a JMX compliant Standard MBean

I got the fallowing exception and issue solved. If your are using MBean , MBean Interface and Implementation should be in same package, Otherwise use MXBean. javax.management.NotCompliantMBeanException: MBean class comlanka.rest.controller.DataManagerController does not implement DynamicMBean, and neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class comlanka.rest.controller.DataManagerController is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: comlanka.rest.controller.DataManagerController: Class comlanka.rest.controller.DataManagerController is not a JMX compliant MXBean)         at com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:176)         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:317)         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)        

git Update failed

  Issue -  when you work with a large team, the git repository may have many branch creation and deletion operations, sometimes we may getting git update failed, when we try to update the whole repository. Solution - Tyr >  git fetch -p -p, --prune After fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag auto-following or due to a --tags option. However, if tags are fetched due to an explicit refspec (either on the command line or in the remote configuration, for example if the remote was cloned with the --mirror option), then they are also subject to pruning.

Angular2 bind data only if form is submitted

How to bind data only if form is submitted in Angular2 This can be down with angular2 form handing with data-driven approach (User Angular  FormBuilder ). Template File <form [ngFormModel]='myForm' (ngSubmit)="onSubmit()"> <input type="text" [ngFormControl]="myForm.controls['userName']" /> <button type="submit">Submit</button> <button>Cancel</button> </form> <br>userName : {{originalUserName}} Angular Component Class export class AppComponent { myForm:ControlGroup; originalUserName:string; constructor(private _formBuilder:FormBuilder) { this.originalUserName = 'abc'; this.myForm = _formBuilder.group({ userName: [this.originalUserName] }); } onSubmit(form) { this.originalUserName = this.myForm.controls['userName'].value; } } GitHub Example Source