360656db9d545d31babf5d8c795cf3353184025d
[platform/core/dotnet/launcher.git] / tools / Extractor / README.md
1 # Line Number Extractor tool
2
3 ### Usage
4
5 ```
6 dotnet-extractor line-number [Log] [Options]
7 ```
8
9 #### Log
10 * Filepath
11    Path to the exception log file (Filename extension: xxxxx.log)
12
13 #### Options
14 * -h, --help  
15     Show this help message
16
17 * -a, --assembly  [Path1:Path2:...]  
18     Multiple paths with assembly directories separated by colon(':')
19
20 * -p, --pdb  [Pdb path]  
21     Path to the pdb directory (Can be omitted if it is the same as the assembly directory path)
22
23 * -o, --out  [Output path]  
24     Path to the output file (Default: Output to console. If omitted, the xxxxx.out file is created in the same location as the log file)
25    
26 #### Example
27 * If both assembly and pdb are in the current directory
28 ```
29  # dotnet extractor line-number /tmp/Exception1.log
30 ```
31
32 * If both assembly and pdb are in the same directory specified
33 ```
34  # dotnet extractor /tmp/Exception2.log --assembly /opt/usr/globalapps/org.tizen.example.TestApp/:/usr/share/dotnet.tizen/
35 ```
36
37 * If assembly and pdb are separated in each directory
38 ```
39  # dotnet extractor /tmp/Exception3.log --assembly /usr/share/dotnet.tizen/framework/ --pdb /tmp/pdbs/
40 ```
41
42 #### Others
43 * Log format
44 ```
45  I/DOTNET_LAUNCHER(27298): System.NullReferenceException: Object reference not set to an instance of an object.
46  I/DOTNET_LAUNCHER(27298):    at TestApp.Program.TestMethod() in TestApp.dll: method_token(0x6000001), il_offset(0x5)
47  I/DOTNET_LAUNCHER(27298):    at TestApp.Program.OnCreate() in TestApp.dll: method_token(0x6000002), il_offset(0x1)
48   ------- Format -------
49  I/DOTNET_LAUNCHER(00000):    at {typeName}.{methodName}() in {moduleName}: method_token{methodToken}, il_offset{ilOffset}
50 ```
51
52 ----
53
54 #### Sample
55 ```
56 sh-3.2# cat /tmp/Exception.log 
57 I/DOTNET_LAUNCHER(27298): System.NullReferenceException: Object reference not set to an instance of an object.
58 I/DOTNET_LAUNCHER(27298):    at LineNumberExtract.Program.ExceptionMethod2() in LineNumberExtract.Tizen.dll: method_token(0x6000001), il_offset(0x5)
59 I/DOTNET_LAUNCHER(27298):    at LineNumberExtract.Program.ExceptionMethod1() in LineNumberExtract.Tizen.dll: method_token(0x6000002), il_offset(0x1)
60 I/DOTNET_LAUNCHER(27298):    at LineNumberExtract.Program.OnCreate() in LineNumberExtract.Tizen.dll: method_token(0x6000004), il_offset(0x15)
61 sh-3.2# 
62 sh-3.2# dotnet eExtractor /tmp/Exception.log --assembly /opt/usr/globalapps/org.tizen.example.LineNumberExtract.Tizen/
63
64 ##### Line Number Extractor Tool (v1.0) #####
65
66 Extraction result:      
67  at LineNumberExtract.Program.ExceptionMethod2(i) in U:\PTX\LineNumberExtract\LineNumberExtract\LineNumberExtract.Tizen\LineNumberExtract.Tizen.cs:line 14
68  at LineNumberExtract.Program.ExceptionMethod1(t) in U:\PTX\LineNumberExtract\LineNumberExtract\LineNumberExtract.Tizen\LineNumberExtract.Tizen.cs:line 19
69  at LineNumberExtract.Program.OnCreate() in U:\PTX\LineNumberExtract\LineNumberExtract\LineNumberExtract.Tizen\LineNumberExtract.Tizen.cs:line 58
70
71 Output: /tmp/Exception.out
72
73 sh-3.2#
74 ```