SPULSRetriever API

%3CLINGO-SUB%20id%3D%22lingo-sub-1163441%22%20slang%3D%22en-US%22%3ESPULSRetriever%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1163441%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20could%20use%20the%20SPULSRetriever%20API%20to%20extract%20the%20ULS%20logs.%20like%20the%20following%20sample%3A%20but%20if%20we%20want%20to%20extract%20all%20logs%20by%20using%20Machine%20Name%2C%20it%20is%20ok%20%3F%3F%20we%20need%20to%20use%26nbsp%3B%3CEM%3E%3CSTRONG%3ESPULSRetriever.GetMachinesFromScopes%3C%2FSTRONG%3E%3C%2FEM%3E%20method%20or%20others%3F%3F%20If%20we%20could%20use%26nbsp%3BSPULSRetriever.GetMachinesFromScopes%20method%2C%20anyone%20have%20sample%20code%20for%20it%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eanother%20question%20is%26nbsp%3B%3A%20is%20it%20also%20possible%20to%20use%20the%20following%20column%20(Time%2C%20Server%2C%20Process%2C%20Thread%2C%20Product%2C%20Category%2C%20etc...%20)%20as%20a%20parameters%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222020-02-10_15-00-06.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F170007i353641D1A4E8559D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%222020-02-10_15-00-06.png%22%20alt%3D%222020-02-10_15-00-06.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3Evar%20ulsLogEntries%20%3D%20new%20SPULSRetriever(%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3E300%2C%201000%2C%20DateTime.Now.AddMinutes(-180)).GetULSEntries(new%20Guid(%22c112209f-4b3a-207a-ed3f-215b21e79954%22))%3B%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor

Hi there,

 

We could use the SPULSRetriever API to extract the ULS logs. like the following sample: but if we want to extract all logs by using Machine Name, it is ok ?? we need to use SPULSRetriever.GetMachinesFromScopes method or others?? If we could use SPULSRetriever.GetMachinesFromScopes method, anyone have sample code for it??

 

another question is : is it also possible to use the following column (Time, Server, Process, Thread, Product, Category, etc... ) as a parameters:

2020-02-10_15-00-06.png

 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

var ulsLogEntries = new SPULSRetriever(
300, 1000, DateTime.Now.AddMinutes(-180)).GetULSEntries(new Guid("c112209f-4b3a-207a-ed3f-215b21e79954"));

0 Replies