the start of every log is the time stamp enclosed in "[" and "]"
i wanted to read the last log based on the sample below where it should be:
[1/26/12 1:06:11:621 CST] 0000003b ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getObjects" on bean "BeanId
this is the sample code i use to read the log file:
if i use: string endText = tr.ReadToEnd(), this will give me the last line which is:Code:TextReader tr = new StreamReader("c:\log.txt");
at com.filenet.engine.ejb.EngineCoreBean.getUserName(EngineCoreBean.java:744)
how can i get to read the start of this last log from bottom up?
thanks in advance.
Code:[1/25/12 1:06:11:652 CST] 0000003b LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called. [1/25/12 1:06:33:027 CST] 00000037 WSRdbManagedC W DSRA9510W: Custom property preTestSQLString should not be empty if the pre-test connection option is selected. [1/25/12 1:14:41:159 CST] 00000025 LdapRegistryI A SECJ0419I: The user registry is currently connected to the LDAP server ldap://SANETDCPRD01:389. [1/26/12 1:06:11:621 CST] 0000003b LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called. [1/26/12 1:06:11:621 CST] 0000003b ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "getObjects" on bean "BeanId(FileNetEngine#Engine-ejb-ws.jar#Engine, null)". Exception data: com.filenet.api.exception.EngineRuntimeException: SECURITY_LDAP_PROVIDER_FAILED: LDAP Provider Access failed for principal 'P8PEAdmin_DEV'. Root cause: SANETDCPRD01:3268; socket closed at com.filenet.engine.security.SecurityProvider.getUser(SecurityProvider.java:681) at com.filenet.engine.jca.impl.RequestBrokerImpl.getUserName(RequestBrokerImpl.java:1291) at com.filenet.engine.ejb.EngineCoreBean._getUserName(EngineCoreBean.java:762) at com.filenet.engine.ejb.EngineCoreBean.getUserName(EngineCoreBean.java:744)




Reply With Quote