How to use Notepad ++ to quickly sort together callstack information (using linefeeds as replaced content)

Source: Internet
Author: User
Tags stack trace


Problem description



==================================



You often need to find some callstack information in the SharePoint ULS log, and you need to expand the callstack. However, the callstack In the ULS log is crowded together, which is inconvenient to view.



I have been manually adding line breaks, but this kind of work is a little bit more recently, so I began to find a solution.



 



For example, the author obtained this callstack from the ULS log,


Error while executing Web Part: Microsoft. businessdata. infrastructure. bdcexception: The Shim execution failed unexpectedly-target application not found (Application ID: adventureapp ).. ---> Microsoft. office. securestoreservice. server. securestoreservicetargetapplicationnotfoundexception: Target application not found (Application ID: adventureapp ). at Microsoft. office. securestoreservice. server. securestoreserviceapplicationproxy. execute [T] (string operationname, Boolean validatecanary, executedelegate '1 operation) at Microsoft. office. securestoreservice. server. securestoreserviceapplicationproxy. getrestrictedcredentials (guid rawpartitionid, string applicationid) at Microsoft. office. securestoreservice. server. securestoreprovider. getrestrictedcredentials (string appid) at Microsoft ....
... Sharepoint. businessdata. systemspecific. DB. dbconnectionmanager. getconnection () at Microsoft. sharepoint. businessdata. systemspecific. DB. dbsystemutility. executestatic (imethodinstance methodinstance, ilobsysteminstance lobsysteminstance, object [] ARGs, iexecutioncontext context) at Microsoft. sharepoint. businessdata. runtime. dataclassruntime. define (invalid systemutility, imethodinstance finished, imethod methodtoexecute, ilobsysteminstance lobsysteminstance, ilobsystem lobsystem, iparametercollection nonreturnparameters, object [] overrideargs) at Microsoft. sharepoint. businessdata. runtime. dataclassruntime. executeinternal (idataclass thisdataclass, ilobsysteminstance lobsysteminstance, ilobsystem lobsystem, imethodinstance methodinstanc...
... Etoexecute, imethod methodtoexecute, iparametercollection nonreturnparameters, object [] & overrideargs) --- end of inner exception stack trace --- at Microsoft. sharepoint. businessdata. runtime. dataclassruntime. executeinternal (idataclass failed, ilobsysteminstance lobsysteminstance, ilobsystem lobsystem, imethodinstance failed, imethod methodtoexecute, iparametercollection failed, object [] & overrideargs) at Microsoft. sharepoint. businessdata. runtime. entityruntime. executeinternal (response failed, ilobsysteminstance lobsysteminstance, ilobsystem lobsystem, imethodinstance failed, imethod methodtoexecute, iparametercollection failed, object [] & overrideargs, ifiltercollection filters) at Microsoft. using poin...
... T. businessdata. runtime. entityruntime. executefiltered (ientity this, ifiltercollection filtercollection, imethodinstance methodinstancetoexecute, ilobsysteminstance lobsysteminstance) at Microsoft. sharepoint. businessdata. runtime. entityruntime. <findfiltered> B _ 3 (ientity E, imethodinstance Mi, ifiltercollection FC, ilobsysteminstance LSI) at Microsoft. sharepoint. businessdata. runtime. entityinstanceenumeratorfactory. createentityinstanceenumerator (ientity entity, imethodinstance methodinstance, ifiltercollection filters, ilobsysteminstance lobsysteminstance, executioncallback) at Microsoft. sharepoint. businessdata. metadatamodel. static. entity. findfiltered (ifiltercollection filtercollection, string findername, ilobsysteminstance lobsysteminstance) at Microsoft. share...
... Point. splistdatasource. getentityinstanceenumerator (xmlnode xnmethodandfilters) at Microsoft. sharepoint. splistdatasource. values (xmldocument xdqueryview, Boolean fformatdates, Boolean futctolocal, string firstrowid, Boolean fbackwardspaging, string & tags, string & tags, list '1 & lstcolumnnames, Dictionary '2 & dictcolumnsused, list '1 & maprowordering, list '1 & lstentitydata) at Microsoft. sharepoint. splistdatasource. values (xmldocument xdqueryview, Boolean fformatdates, Boolean futctolocal, string firstrowid, Boolean fbackwardspaging, string & tags, string & tags, list '1 & lstcolumnnames, Dictionary '2 & dictcolumnsused, list '1 & maprowordering, list '1 & lstentitydata) at Microsoft. sharepoint. splistitemcol...


... Lection. ensureentitydataviewandordering (string & bdcidfirstrow, string & bdcidnextpagefirstrow) at Microsoft. sharepoint. splistitemcollection. ensurelistitemsdata () at Microsoft. sharepoint. splistitemcollection. get_count () at Microsoft. sharepoint. webcontrols. spdatasourceview. executeselect (datasourceselectarguments selectarguments, string aggresponstring, Boolean wantreturn, basexsltlistwebpart webpart, splistitem & listitem, splistitemcollection & listitems, string [] & fieldlist) at Microsoft. sharepoint. webcontrols. singledatasource. getxpathnavigatorinternal () at Microsoft. sharepoint. webcontrols. singledatasource. getxpathnavigator () at Microsoft. sharepoint. webpartpages. dataformwebpart. prepareandpolicmtransform (Boolean bdeferexecutetransform)


Research



==================================



Create a new file in Notepad ++ and enter a few lines of text at will






 



Click the following options






 



The result is as follows. Obviously, Cr and LF are line breaks.






 



Using CR, lf, notepad ++ as the keyword, after searching, the following text is found on the notepad ++ Official Website:



CTRL + HExtendedOption selected instead of Regexp. search for "\ r \ n", or whatever your OS uses, and replace with what you need. it will replace the newline characters with what you entered. note thatThe Windows uses CR-LF newlines (\ r \ n),Old Mac uses Cr (\ r)AndUNIX uses LF (\ n). You can use View-> show symbol-> show end of line to see which characters your file uses-files from other OSes may not behave as you have CT because they have a different newline type.



Some examples:-to add a string to the end of all lines in windows, in ctrl + H with Extended Mode Enabled, replace \ r \ n with string \ r \ n-to add a string to the beginning of all lines in windows, in ctrl + H with Extended Mode Enabled, replace \ r \ n with \ r \ nstring-to remove Extra blank lines in windows, in ctrl + H with Extended Mode Enabled, replace \ r \ n with \ r \ n-to remove all newlines, in ctrl + H with Extended Mode Enabled, replace \ r \ n with nothing.



 



Solution



==================================



Use Notepad ++ to paste the content:






 



In the outbound call replacement dialog box, replace <at> with <\ r \ Nat>, excluding angle brackets.






 



The result is as follows:






 



Let's start with this technique and make good use of notepad ++ to make your work more efficient.



 



References



==================================



How to replace line ends, thus changing the line layout



Http://sourceforge.net/apps/mediawiki/notepad-plus/index.php? Title = replacing_newlines



Replace a "comma space" with a new line in Notepad ++



Http://pressf1.co.nz/showthread.php? T = 91763


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.